fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. int a[10],x=0;
  5. printf("enter ten numbers \n");
  6. scanf("a",%d);
  7. for(int i=0;i++;i<10)
  8. {
  9. if(a[i]>x)
  10. {
  11. x=a[i];
  12. }
  13. }
  14.  
  15. }
  16. return 0;
  17. }
  18.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.c: In function ‘main’:
prog.c:6:11: error: expected expression before ‘%’ token
 scanf("a",%d);
           ^
prog.c:7:18: warning: statement with no effect [-Wunused-value]
 for(int i=0;i++;i<10)
                 ~^~~
prog.c: At top level:
prog.c:16:2: error: expected identifier or ‘(’ before ‘return’
  return 0;
  ^~~~~~
prog.c:17:1: error: expected identifier or ‘(’ before ‘}’ token
 }
 ^
stdout
Standard output is empty