foo.c: In function 'main':
foo.c:7:10: error: invalid preprocessing directive #realcomput
7 | #realcomput();
| ^~~~~~~~~~
foo.c: At top level:
foo.c:11: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
11 | # 定一个计算函数某本书的数量在10本以下不打折,10本以上(包含10)每本打9折。
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
foo.c:12: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
12 | #请编写一个程序,依次输入学校购买n种图书及其数量,输出
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
foo.c:13:2: error: invalid preprocessing directive #\U00009700\U00008981\U0000652f\U00004ed8\U00007684\U0000603b\U00008d39\U00007528
13 | #需要支付的总费用。保留1位小数。
| ^~~~~~~~~~~~~~~~
foo.c:14:1: error: unknown type name 'def'
14 | def comput(price , amount ):
| ^~~
foo.c: In function 'comput':
foo.c:14:28: error: expected declaration specifiers before ':' token
14 | def comput(price , amount ):
| ^
foo.c:24:5: error: expected declaration specifiers before 'total'
24 | total =0;
| ^~~~~
foo.c:25:6: error: invalid preprocessing directive #\U00007b2c\U00004e00\U0000672c\U00004e66
25 | #第一本书 :请输入购买的第1种图书价格(元):18 ,请输入该书的数量:50
| ^~~~~~~~
foo.c:26:9: error: expected declaration specifiers before 'total'
26 | total = comput(18,50)
| ^~~~~
foo.c:28:2: error: invalid preprocessing directive #\U00007b2c\U00004e8c\U0000672c\U00004e66
28 | #第二本书 :请输入购买的第2种图书价格(元):22,请输入该书的数量:8
| ^~~~~~~~
foo.c:31:2: error: invalid preprocessing directive #\U00007b2c\U00004e09\U0000672c\U00004e66
31 | #第三本书 :请输入购买的第3种图书价格(元):16,请输入该书的数量:55
| ^~~~~~~~
foo.c:33:2: error: invalid preprocessing directive #\U00008f93\U000051fa
33 | #输出 总金额
| ^~~~
foo.c:14:5: warning: type of 'price' defaults to 'int' [-Wimplicit-int]
14 | def comput(price , amount ):
| ^~~~~~
foo.c:14:5: warning: type of 'amount' defaults to 'int' [-Wimplicit-int]
foo.c:38: warning: control reaches end of non-void function [-Wreturn-type]
[Hydro](https://hydro.ac)提供评测服务