C++ Tutorial

C++ If...Else

Source: Bro Code

Conditional Statements

Use conditions to run different code paths based on logical tests.

CPP
int n = 8;
if (n > 5) std::cout << "big";
Try it Yourself
Run this CPP example in your local environment or course sandbox.