View Code of Problem 68

#include <stdio.h>
int main(){
  int a,b,c, max;
  scanf("%d %d %d", &a,&b,&c);
  max = a>b:a?b;
  max = max>c:max?c;
  printf("%d", max);
}
/*
Main.c: In function 'main':
Main.c:5:12: error: expected ';' before ':' token
   max = a>b:a?b;
            ^
Main.c:6:14: error: expected ';' before ':' token
   max = max>c:max?c;
              ^
*/

Double click to view unformatted code.


Back to problem 68