if Single-Selection Statement
}Pseudocode
If student’s grade is greater than or equal to 60
Print “Passed”
}If the condition is false, the Print statement is ignored, and the next pseudocode statement in order is performed.
}Indentation
§Optional, but recommended
§Emphasizes the inherent structureof structured programs
}The preceding pseudocode If inJava:
if ( studentGrade >= 60 )
System.out.println( "Passed" );

if…elseDouble-Selection Statement
}if…else double-selection statement—specifyan action to perform when the condition is true and a different action when thecondition is false. }Pseudocode
If student’s grade is greater than or equal to 60
Print “Passed”
Else
Print “Failed”
}The preceding If…Else pseudocode statement inJava:
if ( grade >= 60)
System.out.println( "Passed" );
else
System.out.println( "Failed" );
}Note that the body of the elseis also indented.


