/* Example max1 - maximum of two values Goal: demonstrate the use of if Author: Peter Brusilovsky */ #include main() { int a, b, c; printf("Enter three integers: "); scanf("%d %d %d", &a, &b, &c); printf("Maximum of %d, %d and %d is ", a, b, c); if(a > b) if(a > c) printf("%d\n", a); else printf("%d\n", c); else if(b > c) printf("%d\n", b); else printf("%d\n", c); }