
5-10
Computer Programming with C
Rs. 1,00,000, the rst bock following the if statement is executed otherwise the else block
is executed. In both the blocks, simple arithmetic operations are performed to calculate the
allowances and total salary.
5.4 NESTED if–else STATEMENT
In this kind of statement, a number of logical conditions are checked for executing various statements.
Here, if any logical condition is true the compiler executes the block followed by if condition, oth-
erwise it skips and executes the else block. In the if–else statement the else block is executed by
default aer failure of condition. In order to execute the else block depending ...