10. Write a program to read three numbers from keyboard and find out maximum out of these three. (nested if else)

#include<stdio.h>
#include<conio.h>
void main()
{
int a,b,c;
printf("Enter three numbers:\n");
scanf("%d %d %d",&a,&b,&c);
if(a>b)
{
if(a>c)
printf("%d is max",a);
else
printf("%d is max",c);
}
else
{
if(b>c)
printf("%d is max",b);
else
printf("%d is max",c);
}
getch();
}

#OUTPUT:


Comments

Popular posts from this blog