Computer Science 1026A/B Chapter Notes -Grayscale

48 views3 pages
terubarenuka and 39895 others unlocked
COMPSCI 1026A/B Full Course Notes
26
COMPSCI 1026A/B Full Course Notes
Verified Note
26 documents

Document Summary

{ true execute the statements inside the if statement. False ignore the statements inside the if statement. Test: a boolean with condition(s) that equate to true or false. Body of the statement: when the boolean test result is true, the statements in the body are executed, when it is false, the statements in the body is ignored and execution falls through to the next statement. Brackets: brackets around the statements to be executed if the condition is true are needed when there is more than one statement. However, it is safer to always use brackets even for a single statement in the body, and to line up the brackets for readability. { true execute the statements under the if statement. { false execute the statements under the else statement. If the condition is true, statements under the if statement is executed. Otherwise (in this case since there are no else if statements), execute the statements under the else statement.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents

Related Questions