0% found this document useful (0 votes)
45 views

Flowgorithm - Documentation - If

This document discusses an If statement which checks a boolean expression and then executes code based on whether the expression is true or false. An example is provided that declares an integer called 'age', reads it from keyboard input, and uses an If statement to check if age is greater than or equal to 18, displaying different text depending on the result. The If statement allows code execution to branch based on boolean expressions.

Uploaded by

istiqlal
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
45 views

Flowgorithm - Documentation - If

This document discusses an If statement which checks a boolean expression and then executes code based on whether the expression is true or false. An example is provided that declares an integer called 'age', reads it from keyboard input, and uses an If statement to check if age is greater than or equal to 18, displaying different text depending on the result. The If statement allows code execution to branch based on boolean expressions.

Uploaded by

istiqlal
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Main About Download Documentation Resources

If Shape

Default Appearance

What it Does

An If Statement checks a Boolean expression and then
executes a true or false branch based on the result.

Example
The example, to the right, declares an integer called
'age'. It then reads the age from the keyboard.

Finally, an If Statement checks if the age is greater than
or equal to 18. Based on this, it either takes the false
branch and displays "Sorry, not yet", or takes the true
branch and displays "Go vote!".

You might also like