Feed Headline Animator

Explain “else – if” statement

The else – if statement: -

This is also a conditional statement like a “if – else” statement, but in this statement there is also a part of else – if statement.
Its syntax will be as:
If (condition)
Statement 1;
Else – if (condition)
Statement 2;
Else
Statement 3;
So in this structure first of all condition 1 is checked if it becomes true the statement 1 is executed. But if it become false then condition 2 with else if in checked and if it become true then statement 2 is executed otherwise statement 3 is executed.


Posted by: Wasim Javed

No comments:

Post a Comment