记录详情

Compile Error

/in/foo.c: In function 'main':
/in/foo.c:3:2: warning: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
  scanf("%d",&n);
  ^~~~~
/in/foo.c:3:2: warning: incompatible implicit declaration of built-in function 'scanf'
/in/foo.c:3:2: note: include '<stdio.h>' or provide a declaration of 'scanf'
/in/foo.c:4:26: warning: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
  if(1<=n&&n<=9) {a=1;b=n;printf("%d\n%d\n%d",a,b,b);}
                          ^~~~~~
/in/foo.c:4:26: warning: incompatible implicit declaration of built-in function 'printf'
/in/foo.c:4:26: note: include '<stdio.h>' or provide a declaration of 'printf'
/in/foo.c:5:29: warning: incompatible implicit declaration of built-in function 'printf'
  else if(10<=n&&n<=99) {a=2;printf("%d\n",a);}
                             ^~~~~~
/in/foo.c:5:29: note: include '<stdio.h>' or provide a declaration of 'printf'
/in/foo.c:6:32: warning: incompatible implicit declaration of built-in function 'printf'
  else if(100<=n&&n<=9999) {a=3;printf("%d\n",a);}
                                ^~~~~~
/in/foo.c:6:32: note: include '<stdio.h>' or provide a declaration of 'printf'
/in/foo.c:7:15: warning: statement with no effect [-Wunused-value]
  else (1000<=n&&n<=99999) {a=5;printf("%d\n",a);}
       ~~~~~~~~^~~~~~~~~~~
/in/foo.c:7:27: error: expected ';' before '{' token
  else (1000<=n&&n<=99999) {a=5;printf("%d\n",a);}
                           ^

信息

递交者
类型
自测
语言
C
递交时间
2024-11-15 17:10:52
评测时间
2024-11-15 17:10:52
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes