Friday, 20 December 2013

Program of nested if in c











                   Program of nested if in c
·       /* Program  to print smallest number among three number*/
#include<stdio.h>
main()
{
int  x,y,z;
printf(“enter three number”);
scanf(“%d%d%d”,&x,&y,&z);
if(x<y)
{
          If(x<z)
          printf(“%d is smallest number”,x);
          else
          printf(“%dis smallest number”,z);
}
else
{
          If(y<z)
          printf(“%d is smallest”,y);
          else
          printf(“%d is smallest”,z);
}
}



No comments:

Post a Comment