第37527题 单选题
输入行数,约定 $1 \le lineCount \le 9$,输出以下图形。应在C++代码横线处填入( )。
请输入行数量: 9
        1
       1 2 1
      1 2 3 2 1
     1 2 3 4 3 2 1
    1 2 3 4 5 4 3 2 1
   1 2 3 4 5 6 5 4 3 2 1
  1 2 3 4 5 6 7 6 5 4 3 2 1
 1 2 3 4 5 6 7 8 7 6 5 4 3 2 1
1 2 3 4 5 6 7 8 9 8 7 6 5 4 3 2 1
int lineCount = 0;
cout << "请输入行数量:";
cin >> lineCount;
for (int i = 0; i < lineCount; i++) {
    for (int j = 0; j < ______________; j++) // 此处填写代码
        cout << ' ';
    for (int j = 1; j < i + 1; j++)
        cout << j << " ";
    for (int j = i + 1; j > 0; j--)
        cout << j << " ";
    cout << endl;
}
{{ option.label }}
子题{{ index + 1 }} {{ child.type_label }}
{{ option.label }}
✓ 正确 ◐ 部分正确 ✗ 错误
程序运行统计
暂无判题统计
知识点:
提交{{ questionInfo.stats ? questionInfo.stats.submit_count : 0 }}次 正确率{{ statsAccuracy }}%
答案解析