We use decision making when we want to skip some of the statements in our program as per the condition.
1.if statement:This statement checks for the if condition and executes the statements if it is true.
3 is greater than 1.
2.if else-It checks for the condition and executes the statements in if block if the condition is true .If the condition is false,statements in the else block are executed.
3.nested if-It checks for multiple conditions.
4.Switch case:This is based on the user’s choice.
Since n=1,we will get output:
We can also input the value of n instead of directly assigning it value.