Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- int main() {
- int A, B, C;
- printf("Enter 1st number = ");
- scanf("%d", &A);
- printf("Enter 2nd number = ");
- scanf("%d", &B);
- printf("Enter 3nd number = ");
- scanf("%d", &C);
- if (A > B && A > C) {
- printf("%d is the greatest.", A);
- } else if (B > A && B > C) {
- printf("%d is the greatest.", B);
- } else if (C > B && C > A) {
- printf("%d is the greatest.", C);
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment