#include<iostream>
using namespace std;
const int N = 3, M = 3;
int main() {
int re[N][M];
cout << "请输入学生各门课的成绩: " << endl;
for (int i = 0;i < N;i++) {
for (int j = 0;j < M;j++) {
cin >> re[i][j];
}
cout << endl;
}
for (int i = 0;i < N;i++) {
for (int j = 0;j < M;j++) {
cout << re[i][j] << " ";
}
cout << endl;
}
return 0;
}
vs无报错,运行完第一个for循环后自动结束退出
- 写回答
- 好问题 0 提建议
- 关注问题
- 邀请回答
-
1条回答 默认 最新
CSDN专家-link 2021-09-22 10:07关注cout<<endl去掉试试呢
return 前加 system("pause");本回答被题主选为最佳回答 , 对您是否有帮助呢?解决 无用评论 打赏 举报