Program to find greatest in 3 numbers.
C Programming Language Decision Making of C Language (Article) Decision Making of C Language (Program)
1194Program:
/* Program to find greatest in 3 numbers. Author: Atnyla Developer */ #include #include void main() { int a,b,c; printf("enter value of a, b & c: "); scanf("%d%d%d",&a,&b,&c); if((a>b)&&(a>c)) printf("a is greatest \n"); if((b>c)&&(b>a)) printf("b is greatest \n"); if((c>a)&&(c>b)) printf("c is greatest \n"); }
Output:
enter value of a, b & c: 4 5 6 c is greatest Press any key to continue . . .
Explanation:
Program to print a table of any number.
if((a>b)&&(a>c)) printf("a is greatest \n"); if((b>c)&&(b>a)) printf("b is greatest \n"); if((c>a)&&(c>b)) printf("c is greatest \n");
This Particular section is dedicated to Programs only. If you want learn more about C Programming Language. Then you can visit below links to get more depth on this subject.