+ 1

Using nested if and extended if

Write a program that takes three integers from the user (x, y, z) compares them and finds the maximum of them the second largest and the smallest

10th May 2018, 8:52 AM
Fenny Otieno
Fenny Otieno - avatar
2 Respostas
0
if (x>y){ if (x>z){ cout <<x; } else{ cout <<z; } } else if (y>z){ cout <<y; } else { cout <<z; }
10th May 2018, 9:07 AM
Yugabdh
Yugabdh - avatar
0
Thanks
10th May 2018, 9:18 AM
Fenny Otieno
Fenny Otieno - avatar