记录详情

Compile Error

foo.c: In function 'main':
foo.c:16:28: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
   16 |         if (year1 % 4 == 0 && year1 % 100 != 0 || year1 % 400 == 0) {
      |             ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
foo.c:21:21: warning: unused variable 'x' [-Wunused-variable]
   21 |                 int x;
      |                     ^
foo.c:32:28: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
   32 |             if (i % 4 == 0 && i % 100 != 0 || i % 400 == 0) {
      |                 ~~~~~~~~~~~^~~~~~~~~~~~~~~
foo.c:39:13: error: conflicting types for 'day'; have 'int(int,  int,  int)'
   39 |         int day(int year1, int month1, int day1);
      |             ^~~
foo.c:2:5: note: previous declaration of 'day' with type 'int(int)'
    2 | int day(int year);
      |     ^~~
foo.c:41:28: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
   41 |         if (year1 % 4 == 0 && year1 % 100 != 0 || year1 % 400 == 0) {
      |             ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
foo.c: In function 'day':
foo.c:55:23: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
   55 |     if (year % 4 == 0 && year % 100 != 0 || year % 400 == 0) {
      |         ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
正在同步测试数据,请稍后
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
5-6 过去了多少天
语言
C
递交时间
2022-09-26 18:49:51
评测时间
2022-09-26 18:49:51
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes