记录详情

Compile Error

foo.c: In function 'main':
foo.c:6:11: warning: format '%d' expects argument of type 'int', but argument 2 has type 'int *' [-Wformat=]
    6 |  printf("%d,%d",&n,&k);
      |          ~^     ~~
      |           |     |
      |           int   int *
      |          %ls
foo.c:6:14: warning: format '%d' expects argument of type 'int', but argument 3 has type 'int *' [-Wformat=]
    6 |  printf("%d,%d",&n,&k);
      |             ~^     ~~
      |              |     |
      |              int   int *
      |             %ls
foo.c:7:21: error: stray '\357' in program
    7 |  for(int i=0;i<n;i++)
      |                     ^
foo.c:7:22: error: stray '\274' in program
    7 |  for(int i=0;i<n;i++)
      |                      ^
foo.c:7:23: error: stray '\211' in program
    7 |  for(int i=0;i<n;i++)
      |                       ^
foo.c:7:21: error: expected ')' before '{' token
    7 |  for(int i=0;i<n;i++)
      |     ~               ^
      |                     )
    8 |   {
      |   ~                  
foo.c:11:22: error: stray '\357' in program
   11 |   for(int i=0;i<n;i++)
      |                      ^
foo.c:11:23: error: stray '\274' in program
   11 |   for(int i=0;i<n;i++)
      |                       ^
foo.c:11:24: error: stray '\211' in program
   11 |   for(int i=0;i<n;i++)
      |                        ^
foo.c:7:2: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
    7 |  for(int i=0;i<n;i++)
      |  ^~~
foo.c:30: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
   30 | }
      | 
foo.c:30:1: error: expected declaration or statement at end of input
   30 | }
      | ^
foo.c:5:25: warning: unused variable 'temp' [-Wunused-variable]
    5 |     int a[1000],n,i,j,k,temp;
      |                         ^~~~
foo.c:5:21: warning: unused variable 'j' [-Wunused-variable]
    5 |     int a[1000],n,i,j,k,temp;
      |                     ^
foo.c:5:19: warning: unused variable 'i' [-Wunused-variable]
    5 |     int a[1000],n,i,j,k,temp;
      |                   ^
foo.c:5:9: warning: unused variable 'a' [-Wunused-variable]
    5 |     int a[1000],n,i,j,k,temp;
      |         ^
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
自测
题目
DS8-1 冒泡排序的第k趟
语言
C
递交时间
2021-12-20 15:15:38
评测时间
2021-12-20 15:15:38
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes