Find the greatest number from 3 integers using C
Appearance
<source lang="c">
- include<stdio.h>
/* main: display largest of three unequal values */ int main(void) {
int a, b, c;
printf("enter three unequal integers: ");
scanf("%d%d%d", &a, &b, &c);
printf("%d", (a > b ? a : b) > c ? (a > b ? a : b) : c);
/* indicate success */ return 0;
} </source>