Angry Professor
If - Else statements
if - else statements are basic control structures in any program. They operate on a section of code when a specific condition is met which is given by a boolean expression of comparators (<, >, ==, !=) and can be made complex with use of or and and (|| and &&).
Sample in C++
if(boolean_expression) {
/* statement(s) will execute if the boolean expression is true */
}
else {
/* statement(s) will execute if the boolean expression is false */
}
Related challenge for If - Else statements