Nested If statements
•
Syntax:
•
if ( bool_expr_1 )
•
{
•
statements…
•
if ( bool_expr_2 )
•
{
•
statements…
•
}
•
statements…
•
}
•
Not the same as bool_expr_1 && bool_expr_2
•
After today’s 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.