#4889. 输出数字直角--选择题
输出数字直角--选择题
请输出一个行数为n的数字直角
如输入3,输出样例所示的数字三角,要求设置场宽为3
1 2 3
1 2
1
阅读以下代码,请问空白处应填写的是?()
#include<bits/stdc++.h>
using namespace std;
int main(){
int n;
cin>>n;
for(int i=1;i<=n;i++){
for(______){
cout<<setw(3)<<j;
}
cout<<endl;
}
return 0;
}
{{ select(1) }}
- int j=1;j<=n+1-i;j++
- int j=1;j<=i;j++