记录详情

Compile Error

foo.c: In function 'MoveLeft':
foo.c:7:17: error: expected ',' or ';' before 'for'
    7 |                 for(int j=0;j<n-1;j++)
      |                 ^~~
foo.c:7:29: error: 'j' undeclared (first use in this function)
    7 |                 for(int j=0;j<n-1;j++)
      |                             ^
foo.c:7:29: note: each undeclared identifier is reported only once for each function it appears in
foo.c:7:38: error: expected ';' before ')' token
    7 |                 for(int j=0;j<n-1;j++)
      |                                      ^
      |                                      ;
foo.c:7:38: error: expected statement before ')' token
foo.c: In function 'main':
foo.c:26:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'scanf'
   26 |                 scanf("%d",&k)
      |                 ^~~~~
foo.c:26:29: error: 'k' undeclared (first use in this function)
   26 |                 scanf("%d",&k)
      |                             ^
foo.c:26:31: error: expected ';' before 'MoveLeft'
   26 |                 scanf("%d",&k)
      |                               ^
      |                               ;
   27 |         MoveLeft(a,n,x);
      |         ~~~~~~~~               
foo.c:19:13: warning: unused variable 'number' [-Wunused-variable]
   19 |         int number=0;
      |             ^~~~~~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
A7-6 数组的左移函数
比赛
2023 程序设计与基础(单个的数组)
语言
C
递交时间
2023-11-21 15:51:55
评测时间
2023-11-21 15:51:55
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes