- 5

If and else if statement

31st Aug 2017, 4:52 AM
Alex Mariztelle Morales
3 Answers
31st Aug 2017, 4:54 AM
Hatsy Rei
Hatsy Rei - avatar
+ 3
If statement is used to check for a condition on a particular variable. Else if is used to solve the problem of dangling else, where an else statement is executed if previously unmatched if condition evaluates to false.
31st Aug 2017, 7:52 AM
Satyajit Sahoo
Satyajit Sahoo - avatar
+ 1
if (condition is true){print("somthing");} else { if(conditions are false)print("somthing");}
31st Aug 2017, 8:32 AM
D_Stark
D_Stark - avatar