How is if statement different from if…else statement, explain with example?
for long answer 5 points
class 8
Answers
Answered by
12
Answer:
Syntax of if else statement:
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
5
Explanation:
The if statement is a decision-making structure that consists of an expression followed by one or more statements. The if else is a decision-making structure in which the if statement can be followed by an optional else statement that executes when the expression is false
Similar questions
Physics,
2 months ago
Social Sciences,
2 months ago
English,
2 months ago
Math,
5 months ago
English,
11 months ago