提交时间:2024-02-23 09:20:48
运行 ID: 41687
#include<bits/stdc++.h> using namespace std; int main() { int n; cin>>n; for(int i=0;i<n;i++){ cout<<"*"; } cout<<endl; for(int j=2;j<=n-1;j++){ for(int k=1;k<=n-j;k++){ cout<<" "; } cout<<"*"<<endl; } for(int i=0;i<n;i++){ cout<<"*"; } return 0; }