// this is a C program that read three numbers (a,b,c) and finds the maximum number. #include<stdio.h> #include<conio.h> void main() { int a,b,c; clrscr(); printf("\n\n Enter 1st number :"); scanf("%d",&a); printf("\n Enter 2nd number :"); scanf("%d",&b); printf("\n Enter 3rd number :"); scanf("%d",&c); if((a>b)&&(a>c)) printf("\n\n The maximum number among %d, %d and %d is %d.",a,b,c,a); else if (b>c) printf("\n The maximum number among %d, %d and %d is %d.",a,b,c,b); else printf("\n The maximum number among %d, %d and %d is %d.",a,b,c,c); getch(); }
Related Posts
C program that read two numbers and calculate addition,subtraction ,multiplication division.
// this is a C program that read two numbers and calculate addition,subtraction ,multiplication div[...]
C program that read radius of circle and display area
// this is a C program that read radius of circle and display area. #include<stdio.h> #includ[...]
Binary Search: Source Code
Binary search source code #include<stdio.h> #include<conio.h> void main() { &nbs[...]
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment
If you have any confusion, Please leave a comment. I will assist you. Do not include any URL in comments.
Click to see the code!
To insert emoticon you must added at least one space before the code.