June 2017
Beginner
1296 pages
69h 23m
English
if Single-Selection StatementPrograms use selection statements to choose among alternative courses of action. For example, suppose that the passing grade on an exam is 60. The pseudocode statement
If student’s grade is greater than or equal to 60 Print “Passed”
determines whether the condition “student’s grade is greater than or equal to 60” is true. If so, “Passed” is printed, and the next pseudocode statement in order is “performed.” If the condition is false, the Print statement is ignored, and the next pseudocode statement in order is performed. The indentation of the second line of this selection statement is optional, but recommended, because it emphasizes the inherent structure of structured programs.
The preceding pseudocode If ...