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
How is peace circulated?​
Agata [3.3K]

Answer:

Peace is when people are able to resolve their conflicts without violence and can work together to improve the quality of their lives. 

6 0
3 years ago
Read 2 more answers
To test for the current date in a query, type ____ in the criteria row of the appropriate column.
lyudmila [28]

Answer:

zxc

Explanation:

zc

6 0
3 years ago
Regular languages are closed under complement. True False
aivan3 [116]

Answer: True

Explanation:

A language is said to be closed under a operation here the complement is the operation then if upon application of that operation to any members of that language always yields a member of that language.

regular languages are closed under complement. A proof of the statement is

If a regular language 'L' is regular then there is a DFA X recognizing that regular language 'L'. to show that L' (compliment) is regular we need to have another DFA X' recognizing L'.

The initial state and transition function of both the DFAs are same except their accepting state. Then we can say that X' accepts L'.

So, we can say that regular languages are closed under complement.

4 0
2 years ago
Any device that performs single conversion is ____​
andrew-mc [135]

Answer:

modulator

Explanation:

A modulator is a device that performs modulation.

(Single conversation)

5 0
3 years ago
When a structure must be passed to a function, we can use pointers to constant data to get the performance of a call by ________
andriy [413]

Answer:

Reference value.

Explanation:

8 0
3 years ago
Other questions:
  • How does theatre compare with movies or television? What makes it similar to movies and television? What makes it different?
    13·1 answer
  • Olivia creates a personal budget. She enters her current savings account balance in cell D3. In cell A3, she calculates her inco
    8·1 answer
  • Which kind of software allows users to draw pictures, shapes, and other graphical images with various on-screen tools such as a
    14·1 answer
  • The traditional UNIX scheduler enforces an inverse relationship between priority numbers and priorities: the higher the numbe1~
    6·1 answer
  • When using a presentation software you can change the size of the text to...? Increase Font size, Decrease font size, increase t
    15·2 answers
  • When citing an Internet source:__________. a. it is ok to omit quotation marks if you change some words in the original sentence
    8·1 answer
  • The two major types of system software programs are utility programs and the ________. Select one: A. user interface B. supervis
    13·1 answer
  • Who like the videos where is clown is from :)
    6·1 answer
  • Difrent between computer and computer system​
    9·1 answer
  • What is missing in the following program in order to have the output shown?
    15·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!