Compile Error

foo.cc: In function 'int main()':
foo.cc:6:5: error: expected ';' before 'for'
    6 |  n=3
      |     ^
      |     ;
    7 |  for(k=1;k<=num;k++)
      |  ~~~ 
foo.cc:7:11: warning: statement has no effect [-Wunused-value]
    7 |  for(k=1;k<=num;k++)
      |          ~^~~~~
foo.cc:7:20: error: expected ';' before ')' token
    7 |  for(k=1;k<=num;k++)
      |                    ^
      |                    ;
foo.cc:5:6: warning: unused variable 'i' [-Wunused-variable]
    5 |  int i,j,n,m,k,num;
      |      ^
foo.cc:5:8: warning: unused variable 'j' [-Wunused-variable]
    5 |  int i,j,n,m,k,num;
      |        ^
foo.cc:5:12: warning: unused variable 'm' [-Wunused-variable]
    5 |  int i,j,n,m,k,num;
      |            ^
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1053 *组成的图形(5)
语言
C++
递交时间
2022-01-25 22:51:52
评测时间
2022-01-25 22:51:52
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes