下面的C++不能实现如下输出,但如果将L1标记的cout
请输入矩阵大小n: 9
100000000
020000000
003000000
000400000
000050000
000006000
000000700
000000080
000000009
int n, i, j;
cout << "请输入矩阵大小n: ";
cin >> n;
for (i = 0; i < n; i++){
for (j = 0; j < n; j++){
if (i == j){
cout << i + 1;
continue;
cout << 0; // L1
}
// L2
}
printf("\n");
}
正在加载题目数据…
子题
该题型需在试卷/作业中作答,单题练习暂不支持
答案解析