记录详情

Compile Error

foo.c: In function 'Div':
foo.c:24:13: error: break statement not within loop or switch
   24 |             break;
      |             ^~~~~
foo.c:9:20: warning: variable 'end' set but not used [-Wunused-but-set-variable]
    9 |     int start = 0, end = 0;
      |                    ^~~
foo.c:9:9: warning: variable 'start' set but not used [-Wunused-but-set-variable]
    9 |     int start = 0, end = 0;
      |         ^~~~~
foo.c: At top level:
foo.c:27:5: error: expected identifier or '(' before 'for'
   27 |     for (int k = 0; k < start; k++)
      |     ^~~
foo.c:27:23: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
   27 |     for (int k = 0; k < start; k++)
      |                       ^
foo.c:27:33: error: expected '=', ',', ';', 'asm' or '__attribute__' before '++' token
   27 |     for (int k = 0; k < start; k++)
      |                                 ^~
foo.c:29:12: error: expected declaration specifiers or '...' before string constant
   29 |     printf("(");
      |            ^~~
foo.c:30:5: error: expected identifier or '(' before 'for'
   30 |     for (int k = start; k <= end; k++)
      |     ^~~
foo.c:30:27: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<=' token
   30 |     for (int k = start; k <= end; k++)
      |                           ^~
foo.c:30:36: error: expected '=', ',', ';', 'asm' or '__attribute__' before '++' token
   30 |     for (int k = start; k <= end; k++)
      |                                    ^~
foo.c:32:12: error: expected declaration specifiers or '...' before string constant
   32 |     printf(")\n");
      |            ^~~~~
foo.c:34:5: warning: data definition has no type or storage class
   34 |     free(y);
      |     ^~~~
foo.c:34:5: warning: type defaults to 'int' in declaration of 'free' [-Wimplicit-int]
foo.c:34:5: warning: parameter names (without types) in function declaration
foo.c:34:5: error: conflicting types for 'free'; have 'int()'
In file included from foo.c:2:
/nix/store/y8wfrgk7br5rfz4221lfb9v8w3n0cnyd-glibc-2.37-8-dev/include/stdlib.h:568:13: note: previous declaration of 'free' with type 'void(void *)'
  568 | extern void free (void *__ptr) __THROW;
      |             ^~~~
foo.c:35:5: warning: data definition has no type or storage class
   35 |     free(s);
      |     ^~~~
foo.c:35:5: warning: type defaults to 'int' in declaration of 'free' [-Wimplicit-int]
foo.c:35:5: warning: parameter names (without types) in function declaration
foo.c:35:5: error: conflicting types for 'free'; have 'int()'
/nix/store/y8wfrgk7br5rfz4221lfb9v8w3n0cnyd-glibc-2.37-8-dev/include/stdlib.h:568:13: note: previous declaration of 'free' with type 'void(void *)'
  568 | extern void free (void *__ptr) __THROW;
      |             ^~~~
foo.c:36:1: error: expected identifier or '(' before '}' token
   36 | }
      | ^
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
A11-5 小数的循环节
比赛
2023 程序设计与竞赛(作业6:走向综合)
语言
C
递交时间
2023-10-28 19:56:26
评测时间
2023-10-28 19:56:26
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes