记录详情

Compile Error

/in/foo.c:1:6: error: expected '=', ',', ';', 'asm' or '__attribute__' before '==' token
 year == int(input())
      ^~
/in/foo.c:4:4: warning: data definition has no type or storage class
    days=31
    ^~~~
/in/foo.c:4:4: warning: type defaults to 'int' in declaration of 'days' [-Wimplicit-int]
/in/foo.c:5:3: error: expected ',' or ';' before string constant
   "elif month in [4,6,9,11]";
   ^~~~~~~~~~~~~~~~~~~~~~~~~~
/in/foo.c:6:4: warning: data definition has no type or storage class
    days=30
    ^~~~
/in/foo.c:6:4: warning: type defaults to 'int' in declaration of 'days' [-Wimplicit-int]
/in/foo.c:6:4: error: redefinition of 'days'
/in/foo.c:4:4: note: previous definition of 'days' was here
    days=31
    ^~~~
/in/foo.c:7:4: error: expected ',' or ';' before string constant
    "elif month==2";
    ^~~~~~~~~~~~~~~
/in/foo.c:8:4: error: expected identifier or '(' before 'if'
    if(years%4==0 and year%100!=0)or year%400==0;
    ^~
/in/foo.c:9:4: warning: data definition has no type or storage class
    days=29
    ^~~~
/in/foo.c:9:4: warning: type defaults to 'int' in declaration of 'days' [-Wimplicit-int]
/in/foo.c:9:4: error: redefinition of 'days'
/in/foo.c:4:4: note: previous definition of 'days' was here
    days=31
    ^~~~
/in/foo.c:10:4: error: expected ',' or ';' before 'else'
    else;
    ^~~~
/in/foo.c:11:4: warning: data definition has no type or storage class
    days=28
    ^~~~
/in/foo.c:11:4: warning: type defaults to 'int' in declaration of 'days' [-Wimplicit-int]
/in/foo.c:11:4: error: redefinition of 'days'
/in/foo.c:4:4: note: previous definition of 'days' was here
    days=31
    ^~~~
/in/foo.c:12:4: error: expected ',' or ';' before 'print'
    print(days)
    ^~~~~

信息

递交者
类型
递交
题目
A1-3 分支结构练习:月份天数
比赛
泰院2401程序设计基础作业赛第一场(牛刀小试)
语言
C
递交时间
2024-10-21 17:21:04
评测时间
2024-10-21 17:21:04
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes