Transcription of The if Statement and Practice Problems - Bowdoin College
{{id}} {{{paragraph}}}
TheifStatement and Practice ProblemsThe SimpleifStatementUseTo specify the conditions under which a Statement or group ofstatements should be (boolean-expression) Statement ;whereifis a reserved word,boolean-expressionis an expression that evaluates totrueorfalse, andstatementis a C++ Statement or a group of statements enclosed in curlybraces (a compound Statement ).ActionIf the boolean expression istrue, the specified Statement is executed; otherwise it is not. Ineither case, execution continues with the next Statement inthe grade is a charif (grade == A )cout << "EXCELLENT WORK!" << endl;----------------------------------- ---------------------------------------- --// yards is an intif (yards !)
The if Statement and Practice Problems The Simple if Statement Use To specify the conditions under which a statement or group of statements should be executed.
Domain:
Source:
Link to this page:
Please notify us if you found a problem with this document:
{{id}} {{{paragraph}}}