C++ supports the usual logical conditions from mathematics:
Less than:
a < b
Less than or equal to :
a <= b
Greater than :
a > b
Greater than or equal to :
a == b
C++ has the following conditional statements:
-Use if to specify a block of code to be executed , if a specified condition is true
-Use else to specify a block of code to be executed , if the same condition is false
-Use if else to specify a new condition to test , if the first condition is false.
NOTE THAT' "if" is in lowercase letters . Uppercase letters (If or IF) will generate an error'
NOTE : 'The code inside { } is the body of the /if/ statement
NOTE : `There can be more than one - else if statement but only one *if* and *else* statements.
Top comments (0)