c++ if statement using in code example
Example 1: c++ if example
if (20 > 18) {
cout << "20 is greater than 18";
}
Example 2: if else in C++
//1
if(condition) {
statement(s);
}
else {
statement(s);
}
//2
(condition) ? (true_statement) : (false_statement)