记录详情

Compile Error

foo.c: In function 'main':
foo.c:6:9: error: 'realcomput' undeclared (first use in this function)
    6 |         realcomput;
      |         ^~~~~~~~~~
foo.c:6:9: note: each undeclared identifier is reported only once for each function it appears in
foo.c: At top level:
foo.c:9:3: error: invalid preprocessing directive #\U00005b9a\U00004e00\U00004e2a\U00008ba1\U00007b97\U000051fd\U00006570\U000067d0\U0000672c\U00004e66\U00007684\U00006570\U000091cf\U0000572810\U0000672c\U00004ee5\U00004e0b\U00004e0d\U00006253\U00006298\U0000ff0c10\U0000672c\U00004ee5\U00004e0a\U0000ff08\U00005305\U0000542b10\U0000ff09\U00006bcf\U0000672c\U000062539\U00006298
    9 | # 定一个计算函数某本书的数量在10本以下不打折,10本以上(包含10)每本打9折。
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
foo.c:10:2: error: invalid preprocessing directive #\U00008bf7\U00007f16\U00005199\U00004e00\U00004e2a\U00007a0b\U00005e8f\U0000ff0c\U00004f9d\U00006b21\U00008f93\U00005165\U00005b66\U00006821\U00008d2d\U00004e70n\U000079cd\U000056fe\U00004e66\U000053ca\U00005176\U00006570\U000091cf\U0000ff0c\U00008f93\U000051fa
   10 | #请编写一个程序,依次输入学校购买n种图书及其数量,输出
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
foo.c:11:2: error: invalid preprocessing directive #\U00009700\U00008981\U0000652f\U00004ed8\U00007684\U0000603b\U00008d39\U00007528
   11 | #需要支付的总费用。保留1位小数。
      |  ^~~~~~~~~~~~~~~~
foo.c:12:1: error: unknown type name 'def'
   12 | def comput(price , amount ):
      | ^~~
foo.c: In function 'comput':
foo.c:12:28: error: expected declaration specifiers before ':' token
   12 | def comput(price , amount ):
      |                            ^
foo.c:22:5: error: expected declaration specifiers before 'total'
   22 |     total =0;
      |     ^~~~~
foo.c:23:6: error: invalid preprocessing directive #\U00007b2c\U00004e00\U0000672c\U00004e66
   23 |     #第一本书 :请输入购买的第1种图书价格(元):18 ,请输入该书的数量:50
      |      ^~~~~~~~
foo.c:24:9: error: expected declaration specifiers before 'total'
   24 |         total = comput(18,50)
      |         ^~~~~
foo.c:26:2: error: invalid preprocessing directive #\U00007b2c\U00004e8c\U0000672c\U00004e66
   26 | #第二本书 :请输入购买的第2种图书价格(元):22,请输入该书的数量:8
      |  ^~~~~~~~
foo.c:29:2: error: invalid preprocessing directive #\U00007b2c\U00004e09\U0000672c\U00004e66
   29 | #第三本书 :请输入购买的第3种图书价格(元):16,请输入该书的数量:55
      |  ^~~~~~~~
foo.c:31:2: error: invalid preprocessing directive #\U00008f93\U000051fa
   31 | #输出 总金额
      |  ^~~~
foo.c:12:5: warning: type of 'price' defaults to 'int' [-Wimplicit-int]
   12 | def comput(price , amount ):
      |     ^~~~~~
foo.c:12:5: warning: type of 'amount' defaults to 'int' [-Wimplicit-int]
foo.c:36: warning: control reaches end of non-void function [-Wreturn-type]
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
自测
语言
C
递交时间
2023-10-15 01:05:36
评测时间
2023-10-15 01:05:36
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes