Computer Science, asked by stanish921, 4 months ago

explain if else statement with an suitable example​

Answers

Answered by pds39937
3

Explanation:

Syntax of if else statement:

If condition returns true then the statements inside the body of “if” are executed and the statements inside body of “else” are skipped. If condition returns false then the statements inside the body of “if” are skipped and the statements in “else” are executed.

Answered by TheQAPlayer
0

Answer:

Enter an integer: 7 7 is an odd integer. When the user enters 7, the test expression number%2==0 is evaluated to false. Hence, the statement inside the body of else is executed.

Similar questions