二维数组
2026-02-09 19:57:00
发布于:四川
4阅读
0回复
0点赞
变计算变输出会更快
#include <bits/stdc++.h>
using namespace std;
int main(){
int n,m,a[60][60]={};//定义变量
cin >> n >> m;//输入
for(int i = 1;i <= n;i++){
for(int j = 1;j <= m;j++){//二维循环
a[i][j] = i*j;//计算
cout << a[i][j] << " ";//输出
}
cout << endl;//换行!
}
return 0;//好习惯
}
这里空空如也







有帮助,赞一个