FireEdgeX
0

LESSON 03 ยท C++

Conditions and comparisons

if and else select a path using a boolean expression.

7 min readIn progress

THE IDEA

Understand the concept

A condition evaluates to true or false, and if/else chooses which block should run. Use braces around blocks even when they contain one statement so the intended scope stays visible as the program grows.

WORKED EXAMPLE

See it in context

Example