第11题Rsq100150满分答卷(100150.com)-青少年编程等级考试及竞赛题库
想要打印等腰三角形,输入n=4时,输出如下:Rsq100150满分答卷(100150.com)-青少年编程等级考试及竞赛题库
*
**
* *
* *
* *
**
*
代码空白处应该填入( )。Rsq100150满分答卷(100150.com)-青少年编程等级考试及竞赛题库
int n;
cin >> n;
for (int i= 1; i <= n; i++) {
if(i == 1) cout << "*" << endl;
else {
cout << "*";
for (int j= 1; j<=i-2; j++) cout << " ";
cout << "*" << endl;
}
}
for (int i=_①_; i>= 1; i--) {
if(i== _②_) cout << "*" <<endl;
else {
cout << "*";
for (int j=1; j<=i-2; j++) cout << " ";
cout << "*" << endl;
}
}
Rsq100150满分答卷(100150.com)-青少年编程等级考试及竞赛题库A.
n-1, n-1Rsq100150满分答卷(100150.com)-青少年编程等级考试及竞赛题库
Rsq100150满分答卷(100150.com)-青少年编程等级考试及竞赛题库B.
n, n-1Rsq100150满分答卷(100150.com)-青少年编程等级考试及竞赛题库
Rsq100150满分答卷(100150.com)-青少年编程等级考试及竞赛题库C.
n, 1Rsq100150满分答卷(100150.com)-青少年编程等级考试及竞赛题库
Rsq100150满分答卷(100150.com)-青少年编程等级考试及竞赛题库D.
n-1, 1Rsq100150满分答卷(100150.com)-青少年编程等级考试及竞赛题库