> NESTED IF PROGRAMMING EXAMPLE ~ Online tutorial

NESTED IF PROGRAMMING EXAMPLE

**NESTED PROGRAME**

===================


Nested If statement means to use the if statement inside the other if statement. Here we are providing you an example using Nested-If statement

Program:

#include<studio.h>
#include<conio.h>
void main()
{
int x,y,z,max;
clrscr();
printf("\n x= ");
scanf("%d", &x);
printf("\n y= ");
scanf("%d", &y);
printf("\n z= ");
scanf("%d", &z);
if(x>y)
{
if(x>z)
{
max=x;
}
else
{
option2:
max =z
if(y>z)
}
max=y
max=z
}
else
{
if(y>z)
option1:
{
(x>y);(x>z)
max=y;
max=x;
max=z;
}
else{
max=z
}
}
printf("The Biggest number is %d", max);
getch();
}

Output:

x=20
y=30
z=50

The biggest number is 50


Buy it

Please Give Us Your 1 Minute In Sharing This Post!
Please Give Us Your 1 Minute In Sharing This Post!
SOCIALIZE IT →
FOLLOW US →
SHARE IT →
Powered By: BloggerYard.Com

0 comments: