BidVertiser

Monday, December 5, 2011

C Program:

/* Program in c to find greatest of 3 numbers*/
#include<stdio.h>
#include<conio.h>
void main()
{
int a,b,c;
clrscr();
printf("\n Enter a,b,c:");
scanf("%d %d %d",&a,&b,&c);
if(a>b && a>c)
  printf("\n %d is greatest",a);
else if(c>a && c>b)
  printf("\n %d is greatest",c);
else
  printf("\n %d is greatest",b);
getch();
}