ASP ScriptingJava ScriptingCGI ScriptingHTMLJavaLanguage CERP Education Links

LANGUAGE C

Nested IF

     Check out the output of the following program.

#include <stdio.h> 
main ( )
{
int x, y; 
x = Y = 0; 
clrscr () ;
printf ("Enter Choice (1 - 3 scanf("%d", &x);
if (x == 1)
{
printf("\nEnter value for y (1 - 5);
scanf ( "%d" &y) ;
if (y <= 5)
printf("\nThe value for y is . %d', Y) ;
else 
printf("\nThe value of y exceeded 5 ");
}
else 
printf("\nChoice entered was not 1" );
}

 


Your Ad Here
Not All Of Your Subscribers Use RSS - AWeber Email Marketing
Your Ad Here