记录详情

Compile Error

foo.c:2:6: warning: return type of 'main' is not 'int' [-Wmain]
    2 | void main()
      |      ^~~~
foo.c: In function 'main':
foo.c:4:5: error: expected ',' or ';' before 'scanf'
    4 |     scanf("%d",&n);
      |     ^~~~~
foo.c:5:5: error: 'while\U0000ff08n\U0000ff09' undeclared (first use in this function)
    5 |     while(n)
      |     ^~~~~~~~~~
foo.c:5:5: note: each undeclared identifier is reported only once for each function it appears in
foo.c:5:15: error: expected ';' before '{' token
    5 |     while(n)
      |               ^
      |               ;
    6 |      { sum+=(n%10)*p;
      |      ~         
foo.c:3:17: warning: unused variable 'p' [-Wunused-variable]
    3 | {   int n,sum=0,p=1
      |                 ^
foo.c:3:11: warning: unused variable 'sum' [-Wunused-variable]
    3 | {   int n,sum=0,p=1
      |           ^~~
foo.c:3:9: warning: unused variable 'n' [-Wunused-variable]
    3 | {   int n,sum=0,p=1
      |         ^
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1081 xf1-4进制转换2
比赛
2022年迎新赛(第二场)
语言
C
递交时间
2022-08-27 18:53:57
评测时间
2022-08-27 18:53:57
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes