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