记录详情

Compile Error

foo.c: In function 'main':
foo.c:7:9: warning: unused variable 'day' [-Wunused-variable]
    7 |     int day;
      |         ^~~
foo.c:6:9: warning: unused variable 'month' [-Wunused-variable]
    6 |     int month;
      |         ^~~~~
foo.c:5:13: warning: unused variable 'year' [-Wunused-variable]
    5 |         int year;
      |             ^~~~
foo.c: At top level:
foo.c:9:5: error: redefinition of 'main'
    9 | int main()
      |     ^~~~
foo.c:3:5: note: previous definition of 'main' with type 'int()'
    3 | int main()
      |     ^~~~
foo.c: In function 'main':
foo.c:11:17: error: storage size of 'D1' isn't known
   11 |     struct Date D1,D2;
      |                 ^~
foo.c:11:20: error: storage size of 'D2' isn't known
   11 |     struct Date D1,D2;
      |                    ^~
foo.c:20:13: warning: suggest parentheses around comparison in operand of '&' [-Wparentheses]
   20 |         if(i&4==0&&i%100!=0||i%400==0){
      |             ^
foo.c:20:18: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
   20 |         if(i&4==0&&i%100!=0||i%400==0){
      |            ~~~~~~^~~~~~~~~~
foo.c:34:13: warning: suggest parentheses around comparison in operand of '&' [-Wparentheses]
   34 |         if(i&4==0&&i%100!=0||i%400==0){
      |             ^
foo.c:34:18: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
   34 |         if(i&4==0&&i%100!=0||i%400==0){
      |            ~~~~~~^~~~~~~~~~
foo.c:11:20: warning: unused variable 'D2' [-Wunused-variable]
   11 |     struct Date D1,D2;
      |                    ^~
foo.c:11:17: warning: unused variable 'D1' [-Wunused-variable]
   11 |     struct Date D1,D2;
      |                 ^~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1083 xf1-6计算日期
比赛
2022年迎新赛(第二场)
语言
C
递交时间
2022-08-27 10:50:18
评测时间
2022-08-27 10:50:18
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes