CPPForSchool.com: Flow of Control Set 1: Assignment 5

5. If the ages of Ram, Sulabh and Ajay are input by the user, write a program to determine the youngest of the three. 

This assignment is very similar to the ternary assignments.  However, this program will determine the youngest person, but in the case of the test statements, the lowest value.  Below is my source code.










For fun, I decided to go ahead and test out my ternary operator skills.  Turns out, I got it to work on the first try.  See below for the updated source code.



Comments

Popular posts from this blog

CPPForSchool.com: Variable, Operator & Expression Set 1: Assignment 9

CPPForSchool.com: Array - Single Dimension Set 1 Assignment 6

CPPForSchool.com: Variable, Operator & Expression Set 1: Assignment 8