10 January 2012

Program in c language to find the greatest of three numbers

#include
int main(void){
int a, b, c
print f(“Enter three numbers”)
scan f( “%d %d %d, &a, &b, &c);
if (a>b)
{ if (a>c)
print f(“a is greatest”);
else
print f(“c is greatest”)
}
else
{ if (b>c)
print f(“b is greatest”);
else
print f(“c is greatest”)
}
get ch();
}

0 comments:

Post a Comment