救命哪错了啊
查看原帖
救命哪错了啊
829082
yingfen楼主2023/8/4 13:42
#include <iostream>
using namespace std;

int main(){
    char p;
    cin>>p;
    for(int a=0;a<=2;a++){
        for(int b=0;b<=2-a;b++){
            cout<<' ';
        }
        for(int i=0;i<=2*a;i++){
            cout<<p;
        }
        for(int k=0;k<=2-a;k++){
        	cout<<' ';
		}
        if(a==2) continue;
        cout<<endl;
    }
}
2023/8/4 13:42
加载中...