GoogelAddUnit1

Monday, 16 April 2012

WRITE A C-PROGRAM TO FIND THE BIGGEST NUMBER AMONG THREE NUMBERS.

AIM:A program to find the biggest number among three numbers.
PROGRAM:
#include<stdio.h>
main()
{
int a,b,c,big;
printf("enter the values of a,b,c");
scanf("%d%d%d",&a,&b,&c);
if((a>b)&&(a>c))
big=a;
else
if((b>a)&&(b>c))
big=b;
else
big=c;
printf("biggest number=%d",big);
}
OUTPUT:
enter the values of a,b,c
2,3,4
biggest number =4.

No comments:

Post a Comment