Back to course

Control Flow: If Statements

C++ Masterclass: From Zero to Hero

The if statement executes code only if a condition is true. cpp if (age >= 18) { std::cout << "Adult"; }