竞赛
考级
#include <iostream> #include <iomanip> using namespace std; int main() { int n; cin >> n; for (int i = 0; i < n; i++) { int t=1; for (int j = 0; j < n; j++) { if (i<=j) { cout<<setw(5)<<t; t++; } else cout <<" "; } cout << endl; } }
༺ཌༀ🤡摸头扫码ༀད༻
???
skirmish
附带解析
一只雪梨
#include <bits/stdc++.h> using namespace std; int main(){ int n; cin>>n; for (int i=1;i<=n;i++){ int cnt=1,c=n-i+1; for (int j=1;j<=i-1;j++) cout<<" "; while (c>0){ cout<<setw(5)<<cnt; cnt++; c--; } cout<<endl; } return 0; }
人
zyz610
提交答案之后,这里将显示提交结果~