记录详情

Compile Error

/in/foo.c: In function 'runnian':
/in/foo.c:4:5: warning: type of 'a' defaults to 'int' [-Wimplicit-int]
 int runnian(a)
     ^~~~~~~
/in/foo.c:6:21: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
  if(a%4==0||a%100==0&&a%400==0)
             ~~~~~~~~^~~~~~~~~~
/in/foo.c: In function 'main':
/in/foo.c:18:8: error: expected identifier or '(' before 'int'
  int a,int b;
        ^~~
/in/foo.c:20:22: error: 'b' undeclared (first use in this function)
  scanf("%d %d\n",&a,&b);
                      ^
/in/foo.c:20:22: note: each undeclared identifier is reported only once for each function it appears in
/in/foo.c:24:2: warning: statement with no effect [-Wunused-value]
  for(i;i<=b;i++)
  ^~~
/in/foo.c:28:4: error: 'sum' undeclared (first use in this function)
    sum++;
    ^~~
/in/foo.c:21:6: warning: unused variable 'num' [-Wunused-variable]
  int num;     //统计闰年的个数
      ^~~

信息

递交者
类型
递交
题目
P1182 闰年祝福
比赛
2020年互联网创新创业科技节程序设计大赛
语言
C
递交时间
2020-12-09 13:46:55
评测时间
2020-12-09 13:46:55
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes