Write a C program that accepts three integers and find the maximum of three.
#include#include int main() { int a, b, c; printf("\nEnter the three integer: "); scanf("%d %d %d", &a, &b, &c); if (a > b && a > b) { printf("Maximum = %d", a); } else if (b > a && b > c) { printf("Maximum = %d", b); } else { printf("Maximum = %d", c); } return 0; }
0 comments:
Post a Comment