fork download
  1. #include <stdio.h>
  2.  
  3.  
  4. int main(){
  5.  
  6. int a;
  7. int b;
  8. int c;
  9. int d;
  10.  
  11. scanf("%d",&a);
  12.  
  13. scanf("%d",&b);
  14.  
  15.  
  16. c = a % 100;
  17. d = b % 100;
  18.  
  19. c = c /10;
  20. d = d /10;
  21.  
  22. printf("%d\n",c);
  23. printf("%d\n",d);
  24.  
  25.  
  26.  
  27. if (c < d){
  28. printf("a < b");
  29. } else if (c > d) {
  30. printf("b < a");
  31. } else {
  32. printf("a == b");
  33. };
  34.  
  35. };
Compilation error #stdin compilation error #stdout 0.01s 5264KB
stdin
141 142
compilation info
prog.c: In function ‘main’:
prog.c:25:12: warning: passing argument 1 of ‘printf’ makes pointer from integer without a cast [-Wint-conversion]
     printf(1)
            ^
In file included from /usr/include/stdio.h:867,
                 from prog.c:1:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:105:32: note: expected ‘const char * restrict’ but argument is of type ‘int’
 printf (const char *__restrict __fmt, ...)
         ~~~~~~~~~~~~~~~~~~~~~~~^~~~~
prog.c:25:5: warning: format not a string literal and no format arguments [-Wformat-security]
     printf(1)
     ^~~~~~
prog.c:25:14: error: expected ‘;’ before ‘if’
     printf(1)
              ^
              ;
prog.c:27:5:
     if (c < d){
     ~~        
prog.c:11:5: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result]
     scanf("%d",&a);
     ^~~~~~~~~~~~~~
prog.c:13:5: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result]
     scanf("%d",&b);
     ^~~~~~~~~~~~~~
stdout
Standard output is empty