记录详情

Compile Error

/in/foo.c:1:1: warning: data definition has no type or storage class
    1 | n = int(input("请输入学校需要购买几种图书:"))
      | ^
/in/foo.c:1:1: warning: type defaults to 'int' in declaration of 'n' [-Wimplicit-int]
/in/foo.c:1:5: error: expected expression before 'int'
    1 | n = int(input("请输入学校需要购买几种图书:"))
      |     ^~~
/in/foo.c:10:40: error: stray '#' in program
   10 |         cost = price * quantity * 0.9  # 打9折
      |                                        ^
/in/foo.c:12:34: error: stray '#' in program
   12 |         cost = price * quantity  # 不打折
      |                                  ^

信息

递交者
类型
递交
比赛
信息技术通识练习题
语言
C
递交时间
2025-05-20 17:52:09
评测时间
2025-05-20 17:52:09
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes