第37754题 判断题
下面的C++不能实现如下输出,但如果将L1标记的cout << 0行移动if块外面,或者说移动到 L2 标记 行,则可以。( )
请输入矩阵大小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");
}
{{ option.label }}
子题{{ index + 1 }} {{ child.type_label }}
{{ option.label }}
✓ 正确 ◐ 部分正确 ✗ 错误
程序运行统计
暂无判题统计
知识点:
提交{{ questionInfo.stats ? questionInfo.stats.submit_count : 0 }}次 正确率{{ statsAccuracy }}%
答案解析