how is 8 10 not the correct answer?
how is 8 10 not the correct answer?
An if-else statement is a type of conditional statement commonly employed in programming to regulate the execution flow of a programme. The conditional statement permits the execution of a designated code block solely when a specified condition is satisfied, while an alternative code block is executed when the condition is not satisfied. This feature enables the execution of various programme branches, contingent upon distinct inputs or conditions. The if-else statement is conventionally implemented through the utilisation of the keywords "if," "else," and "else if" in order to delineate distinct conditions and the corresponding code to be executed. The utilisation of if-else statements in programming facilitates the creation of programmes that possess enhanced dynamism and versatility. This is achieved by enabling the execution of different actions in response to diverse inputs and situations.
Step by step
Solved in 3 steps