C Program to find greatest of three numbers

#include
void main()
{
 int a,b,c;
 printf("enter 1st no\n");
 scanf("%d",&a);
 printf("enter 2nd no\n");
 scanf("%d",&b);
 printf("enter 3rd no\n");
 scanf("%d",&c);
 a=a>b?a:b;
 a=a>c?a:c;
 printf("greatest no.is %d\n",a);
}
Output:
Output of C program to find greatest of three numbers

C Program to find greatest of three numbers C Program to find greatest of three numbers Reviewed by Prashant Sengar on December 22, 2017 Rating: 5

No comments:

Powered by Blogger.