第19700题 单选题
针对实现指定数字输出图形的C++代码,下列说法错误的是哪一项?

下面C++代码实现输出如下图形,相关说法错误的是( )。 请输入层数: 10 0 12 345 6789 01234 567890 1234567 89012345 678901234 5678901234

int line_number, now_number;
int i, row;
cout << "请输入行数: ";
cin >> line_number;
now_number = 0;
for (row = 1; row < line_number + 1; row++) { // L1
    for (i = 0; i < row; i++) { // L2
        cout << now_number;
        now_number += 1;
        if (now_number == 10) now_number = 0; // L3
    }
    cout << endl;
}
{{ option.label }}
子题{{ index + 1 }} {{ child.type_label }}
{{ option.label }}
✓ 正确 ◐ 部分正确 ✗ 错误
程序运行统计
暂无判题统计
提交{{ questionInfo.stats ? questionInfo.stats.submit_count : 0 }}次 正确率{{ statsAccuracy }}%
答案解析