Quick Print – CSKC
Sign In

Search

siteicon
Code Learning #CPP#2943 Back

Largest of three numbers using nested ternary operator

A program to demonstrate nesting of ternary operator while finding the largest of three numbers.

 

Source Code

		 

Run Output

Enter three integers: 1 2 3
3 is largest.

-OR-
Enter three integers: 43 12 32
43 is largest.

-OR-
Enter three integers: 103 104 101
104 is largest.