Syntax:
if(conditional_expression)
{
if(conditional_conditional_expression-1){
statement(s);
} else {
statement(s);
}
} else {
statement(s);
}
Example:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | #include<stdio.h> void main(){ int com, math; com = 55; math = 44; if(com>=50){ if(math>=50){ printf("You are selected !!"); } else { printf("You are not selected !!"); } } else { printf("Sorry !! you are not selected !!"); } getch(); } |
Output
You are not selected !!
0 comments:
Post a Comment