if Statement
An if statement allows a program to choose whether or not to execute a following statement.
Syntax:
if (condition)
statement;
Semantics:
condition is a Boolean expression: Something that evaluates to True or False.
If condition is true then execute the statement is executed.
Previous slide
Next slide
Back to first slide
View graphic version