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
Murljashka [212]
3 years ago
7

2.8 Code Practice: Question 1

Computers and Technology
2 answers:
likoan [24]3 years ago
6 0

Input: A = 2, B = 8, C = 1

Output: Largest number = 8

-BARSIC- [3]3 years ago
4 0

Answer:

The program to this question can be given as:

Program:

#include <stdio.h> //define header file

int main() //define main method.

{

int a1,b1,c1; //define variable

printf("Enter three numbers:\n"); //message

scanf("%d",&a1); //input numbers.

scanf("%d",&b1);//input numbers.

scanf("%d",&c1);//input numbers.

if (a1>b1) //check condition

{

//check condition

if(a1>c1)//inner if block

{

printf("The largest number: %d", a1); //message

}

else  //inner else block

{

printf("The largest number: %d", c1);//message

}

}

else //else block

{

//check condition

if(b1>c1) //inner if block.

{

printf("The largest number: %d", b1);//message

}

else //else block

{

printf("The largest number: %d",c1);//message

}

}

return 0;  //return 0.

}

Output:

Enter three numbers:

22

44

11

The largest number: 44

Explanation:

The description of the above program can be given as:

  • In the C language program firstly we define the header file. Then we define the main function. In the main function, we define three variables that are "a1, b1 and c1". In this variable, we take input from the user.
  • Then we define the conditional statements. In the if block we check if the value of a1 is greater then the value of b1 if this condition is true so we use another condition that if the value of a1 is greater then the value of c1. so, it will print the largest value. If the above condition is not true then it will go to else section.
  • In the else part we check the condition that if the value of b1 is greater then the value of c1. if it is true it will print the largest number value.  
You might be interested in
What is co-operating process
Greeley [361]

Answer: A process is independent if it cannot affect other process or be affected by it

Explanation:

3 0
3 years ago
Why can't we sign up to brainly.com??????????????????
LiRa [457]

Answer:

Explanation:

so why are you doing sign up

8 0
3 years ago
Write an<br> algorithm for "How to Polish Your<br> Shoes".
sammy [17]

Answer:

Step 1- Start

Step 2- Take out your shoes

Step 3- Take out the shoe polish

Step 4- Put the shoe polish on your shoe

Step 5- Then polish your shoe

Step 6- Stop

hope this helps

6 0
3 years ago
In multi-channel funnel reports, how are default conversions credited?
g100num [7]

The Multi-Channel Funnels reports are generated from conversion paths, the sequences of interactions (i.e., clicks/referrals from channels) that led up to each conversion and transaction. In the reports, channels are credited according to the roles they play in conversions—how often they assisted and/or completed sales and conversions.

6 0
2 years ago
To display the entire entry for a calculated field, select the column in the Field row, right-click to display the shortcut menu
matrenka [14]
Then click zoom :))))))<span />
3 0
3 years ago
Other questions:
  • Which tool encrypts entire drives, rendering them unusable unless one possesses the correct key to unlock the drive?
    8·1 answer
  • What is the difference between 1080p and 2k?
    14·1 answer
  • A plan to budget time for studying and activities is referred to as
    15·1 answer
  • to create a cover letter to send to a potential employers along with a resume what software program should you use
    10·1 answer
  • "A software package developed to handle information requirements for a specific type of business is called a horizontal applicat
    8·2 answers
  • Assume the method doSomething has been defined as follows: public static void doSomething (int[] values, int p1, int p2) { int t
    6·1 answer
  • Can someone tell me how to get rid of the the orange with blue and orange on the status bar
    14·2 answers
  • True or false = the order of cannot be changed in slide shorter view ,true or false =menu bar is located just below the title ba
    8·2 answers
  • Direction: using the data at the left, answer the questions that follows.​
    11·1 answer
  • What does a hanging indent look like?
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!