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
(BRAINLIEST FOR FIRST CORRECT ANSWER) Mark (all) the statements that best describe the use of spreadsheets and tables in present
mel-nik [20]

the answer is Headers should be descriptive of the cell content, The font size should be at least 18-point. hope this helps!!!

5 0
3 years ago
Michael is discussing various project needs with his team. Match Michael’s statement with the way project management can help th
Reika [66]

Answer:

get out there outside and get out and see what you do when you're ready for a workout or a day off and you're going through the

7 0
4 years ago
What are some ways tables can be inserted into a document check all reply
Natalka [10]
I dont know hdhehehehe
6 0
3 years ago
Read 2 more answers
Below, we’ve provided a for loop that sums all the elements of list1. Write code that accomplishes the same task, but instead us
Tanzania [10]

Answer:

Explanation:

The code that would best accomplish this task using a while loop would be the following:

list1 = [8, 3, 4, 5, 6, 7, 9]

accum = 0

n = 0

while n < 7:

        accum += list1[n]

        n += 1

This code will continue throughout the list1 array and add every value to the accum variable.

5 0
3 years ago
What is a output devices?
V125BC [204]
Any piece of computer hardware equipment which converts information into a human-perceptible form or, historically, into a physical machine-readable form for use with other non-computerized equipment. It can be text, graphics, tactile, audio, or video.
3 0
2 years ago
Read 2 more answers
Other questions:
  • _ effects determine how slide elements disappear
    11·1 answer
  • What is the communications activity of the Internet called
    15·1 answer
  • 1. Why was the Internet created?
    8·1 answer
  • When should you talk to an adult you trust
    12·1 answer
  • Miguel owns a tile business. He has two employees who work in a small office. One answers phones and schedules appointments. Ano
    11·2 answers
  • java Write a program that reads a list of words. Then, the program outputs those words and their frequencies. The input begins w
    11·1 answer
  • 4. Give four reasons why a laptop computer is more expensive than a desktop computer of the
    10·1 answer
  • There are two main types of hard drive available to a computer. State what they are and describe their use.
    5·1 answer
  • Matt uploads a malware sample to a third-party malware scanning site that uses multiple antimalware and antivirus engines to sca
    11·1 answer
  • Hisoka is creating a summary document for new employees about their options for different mobile devices. One part of his report
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!