Question: Write a complete program to determine and print which among the 5 numbers entered from the keyboard is the highest and which one is the
Write a complete program to determine and print which among the 5 numbers entered from the keyboard is the highest and which one is the lowest, using the conditional operator.
Use 2 c++ statements only for determining the largest number and also 2 c++ statements only to determine the lowest number.
7 SELECTION S E US OPERATORS 2nd SOLUTION (only one statement for determining the largest number) int a, b, largest; largest=fa>=c)? a': c) : ((b >= c)? b:c);, 5 3 cout=b && a>= c)? a :((b >= c)?b:c); cout
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
