We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent db0d596 commit 91cb93aCopy full SHA for 91cb93a
questions/question6.c
@@ -12,8 +12,8 @@ int main(){
12
printf("enter 3 integers:\n");
13
scanf("%d %d %d", &a,&b,&c);
14
15
- max = (a > b && a > c)? a: (b > c)? b: c;
16
- min = (a < b && a < c)? a: (b < c)? b: c;
+ max = (a>b)?((a>c)?a:c):((b>c)?b:c); //oneway
+ min = (a < b && a < c)? a: (b < c)? b: c; //another way
17
18
printf("max number is: %d\n", max);
19
printf("min number is: %d\n", min);
0 commit comments