Compile Error

foo.cc: In function 'int main()':
foo.cc:5:10: warning: variable 'j' set but not used [-Wunused-but-set-variable]
  int m,i,j,k=1,n;
          ^
foo.cc: At global scope:
foo.cc:24:1: error: expected unqualified-id before 'for'
 for(i=1;i<=n;i++)
 ^~~
foo.cc:24:9: error: 'i' does not name a type
 for(i=1;i<=n;i++)
         ^
foo.cc:24:14: error: 'i' does not name a type
 for(i=1;i<=n;i++)
              ^
foo.cc:25:9: error: 'j' does not name a type
 for(j=1;j<=n;j++)
         ^
foo.cc:25:14: error: 'j' does not name a type
 for(j=1;j<=n;j++)
              ^
foo.cc:27:1: error: 'cout' does not name a type; did you mean 'cosl'?
 cout<<endl;
 ^~~~
 cosl
foo.cc:30:1: error: expected unqualified-id before 'for'
 for(i=2;i<=n;i++)
 ^~~
foo.cc:30:9: error: 'i' does not name a type
 for(i=2;i<=n;i++)
         ^
foo.cc:30:14: error: 'i' does not name a type
 for(i=2;i<=n;i++)
              ^
foo.cc:35:1: error: 'k' does not name a type
 k=k+1;
 ^
foo.cc:36:1: error: expected declaration before '}' token
 }
 ^
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1916 拉丁方阵(lading)
语言
C++
递交时间
2021-11-17 17:15:52
评测时间
2021-11-17 17:15:52
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes