C Programming Tutorial - 20: Nested if-else Statement

preview_player
Показать описание
In this tutorial we'll see the nested if-else construct. There is no restriction on the level at which nesting can be performed in programs.
Рекомендации по теме
Комментарии
Автор

The best beginner's tutorial I've seen!

librarypotuk
Автор

Hi

Can you please help me to understand
If (x& y)
Print x
Else
Print y

sutanuganguly
Автор

I keep getting code will never be executed.

crimsonking
Автор

Do this sir please ..
Program that will ask a user to enter his/her age and gender. If the user is male with an age greater than 17 print "Hello", If the user is female with an age greater than 17 print "Hi", else print "error".

johnpaulbayok
Автор

can u explain why you would use...nest this instead of just doing?
if ___
else if ___
else ___

mapins
Автор

Why not like this? : if(a==1) {
printf("You entered 1");
}
else if (a==2) { printf("You entered 2");
}
Else
{ Printf("Wrong number!");
}

edward