358,470 views
36 votes
36 votes
Which type of selection control structure can be used to display the largest of three numbers and write the syntax of it .

pls need help :(​

User Todd Berman
by
3.0k points

2 Answers

27 votes
27 votes

Let's go with python

  • We gonna use if statement

If numbers be x,y,z

Program:-


\tt if\: x>y\;and x>z:


\tt\qquad Greatest=x


\tt elif\:y>x\;and\;y>z:


\tt \qquad Greatest=y


\tt else:


\tt\qquad Greatest=z


\tt print(

User Shawn Craver
by
3.0k points
27 votes
27 votes

Answer:

if statements

Step-by-step explanation:

suppose a, b and c are the numbers:

if ((a>=b) && (a>=c)) {

printf("a is largest");

} else if ((b>=a) && (b>=c)) {

printf("b is largest");

} else {

printf("c is largest");

}

User German Capuano
by
3.2k points