CIS 1057 Chapter Notes - Chapter 6: Flowchart
Document Summary
The if statement is the primary selection control structure in c. A flowchart is a diagram that shows the step-by-step execution of a control structure if statement with one alternative if (condition) statement; If the condition is true, the statement that directly follows it is executed. If the condition is false, the statement is not executed if statement with two alternatives if (condition) else statement; statement; If the condition is true, execute the statement that directly follows. If the condition is not true, execute the statement that directly follows else. Using whitespace helps make the meaning of an if statement apparent to readers if statements with compound statements. Rather than following an if/else with a single statement, we can follow them with compound statements encased in curly braces to execute multiple statements if (condition) { Hand tracing/desk checking is the process of manually stimulating the execution of an algorithm.