Tuesday, January 13, 2015

BIGGEST OF 3 NUMBERS

PROGRAM:

#include<stdio.h>
main()

{
int a,b,c;

printf("Enter 3 Numbers\n"); scanf("%d%d%d",&a,&b,&c); if(a>b)

{

if(a>c)

{

printf("The First Number %d(a) is Biggest\n",a);

}

}

else if(b>c)

 {
printf("The Second Number %d(b) is Biggest\n",b);

}
else

printf("The Third Number %d(c) is Biggest\n",c);
}




OUTPUT:

Enter 3 Numbers 5 9 2


The Second Number 89(b) is Biggest

No comments:

Post a Comment