记录详情

Compile Error

foo.c: In function 'main':
foo.c:6:5: error: stray '\357' in program
    6 |  for(x=1;x<i;x++)
      |     ^
foo.c:6:6: error: stray '\274' in program
    6 |  for(x=1;x<i;x++)
      |      ^
foo.c:6:7: error: stray '\210' in program
    6 |  for(x=1;x<i;x++)
      |       ^
foo.c:6:8: error: expected '(' before 'x'
    6 |  for(x=1;x<i;x++)
      |        ^
      |        (
foo.c:6:2: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
    6 |  for(x=1;x<i;x++)
      |  ^~~
foo.c:6:12: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
    6 |  for(x=1;x<i;x++)
      |            ^
foo.c:6:13: warning: statement with no effect [-Wunused-value]
    6 |  for(x=1;x<i;x++)
      |            ~^~
foo.c:6:19: error: expected ';' before ')' token
    6 |  for(x=1;x<i;x++)
      |                   ^
      |                   ;
foo.c:6:19: error: expected statement before ')' token
foo.c:9:4: warning: statement with no effect [-Wunused-value]
    9 |   k==0;
      |   ~^~~
foo.c:10:3: warning: this 'while' clause does not guard... [-Wmisleading-indentation]
   10 |   while(j>0);
      |   ^~~~~
foo.c:11:3: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'while'
   11 |   {
      |   ^
foo.c:20:19: error: 'h' undeclared (first use in this function)
   20 |     printf("%d\n",h);
      |                   ^
foo.c:20:19: note: each undeclared identifier is reported only once for each function it appears in
foo.c:5:2: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
    5 |  scanf("%d",&i);
      |  ^~~~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
比赛
2022春 C语言课程设计 作业1
语言
C
递交时间
2022-02-28 20:29:53
评测时间
2022-02-28 20:29:53
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes