Nested If statements
int x = 2, y = 5;
if ( x < y)
{
cout << x is smaller than y;
if ( (x % 2) == 0)
{
cout << and even;
}
}
cout << , done << endl;
x is smaller than y and even, done
After todays class you will have seen all the elements needed to write this program. Basic mathematical operators, the if control structure, input and output, the sqrt() function.