1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
rodikova [14]
3 years ago
8

Write a program whose inputs are three integers, and whose outputs are the largest of the three values and the smallest of the t

hree values. If the input is 7 15 3, the output is: largest: 15 smallest: 3 Your program should define and call two functions: Function LargestNumber(integer num1, integer num2, integer num3) returns integer largestNum Function SmallestNumber(integer num1, integer num2, integer num3) returns integer smallestNum
Computers and Technology
1 answer:
Monica [59]3 years ago
7 0

Answer:

int SmallestNumber(int num1, int num2, int num3){

int smallest;

if (num1 >num2){

smallest=num2;

}

else {

smallest=num1;

}

if(smallest <num3){

smallest=num3;

}

}

int LargestNumber(int num1, int num2, int num3){

int largest;

if (num1 <num2){

largest=num2;

}

else {

largest=num1;

}

if(largest>num3){

largest=num3;

}

}

void main(){

int num1,num2,num3;

printf("enter values");

scanf("%d%d%d",&num1,&num2,&num3);

int smallest=SmallestNumber(num1,num2,num3);

int largest=LargestNumber(num1,num2,num3);

}

Explanation:

we are comparing first two numbers and finding largest among those. After getting largest comparing that with remaining if it is greater then it will be largest of three. Same logic applicable to smallest also

You might be interested in
Memory containing hardwired instructions that the computer uses when it boots up, before the system loads. In PCs the instructio
VladimirAG [237]

Answer:

<h2>Rom</h2>

Explanation:

ROM is memory containing hardwired instructions that the computer uses when it boots up, before the system software loads

4 0
3 years ago
Read 2 more answers
What will be the results of executing the following statements? x.setEditable(true); x.setText("Tiny Tim"); a. The text field x
maxonik [38]

Answer:

Option B: The text field x will have the value "Tiny Tim" and the user will be able to change its value.

Explanation:

  • The first statement say:  x.setEditable(true);

It will only change the property of the text present in x to editable. This means that whenever the text value needs to change the user can edit it.

  • The second statement say:   x.setText("Tiny Tim");

It will put the text "Tiny Tim" into the attribute x and present it as the output or result.

6 0
3 years ago
Choose the answer that best completes the
Fiesta28 [93]

Answer:

the information processing cycle

Explanation:

3 0
2 years ago
Read 2 more answers
Is it possible build a real time machine?
Helga [31]

Answer:

Travelling in time might sound like a flight of fancy, but some physicists think it might really be possible. BBC Horizon looked at some of the most promising ideas for turning this staple of science fiction into reality.

Explanation:

7 0
2 years ago
Read 2 more answers
Two-factor authentication can best be breached by the adversary using:________. a. social engineering attack b. using sniffers l
tiny-mole [99]

Answer:

a. social engineering attack

Explanation:

Two-factor authentication requires that the user/owner of the account enter a second verification code alongside their password in order to access the account. This code is usually sent to a personal phone number or email address. Therefore in order to breach such a security measure the best options is a social engineering attack. These are attacks that are accomplished through human interactions, using psychological manipulation in order to trick the victim into making a mistake or giving away that private information such as the verification code or access to the private email.

6 0
3 years ago
Other questions:
  • The ____ cell on the worksheet is the one into which you can enter data.â
    15·2 answers
  • Network signaling is a function of which layer of the osi model
    10·1 answer
  • HURRY UP !!!!!!’<br> Each packet is addressed to the recipient's .
    8·1 answer
  • 2. Use inheritance to create a hierarchy of Exception classes -- EndOfSentenceException, PunctuationException, and CommaExceptio
    6·1 answer
  • 3. What are the first steps that you should take if you are unable to get onto the Internet? (1 point)
    15·1 answer
  • What kind of battery does a dji spark have?
    12·1 answer
  • write a program with total change amount as an integer input and output the change using the fewest coins, one coin type per lin
    8·1 answer
  • What can you find the under the privacy policy section of a shopping website?
    12·1 answer
  • Convert octal number 2470 to decimal number
    14·2 answers
  • Which of these lines of code will increment a variable?
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!