求助!!!
  • 板块学术版
  • 楼主LCH22014
  • 当前回复1
  • 已保存回复1
  • 发布时间2024/7/16 18:08
  • 上次更新2024/7/16 19:28:51
查看原帖
求助!!!
1357239
LCH22014楼主2024/7/16 18:08
#include<bits/stdc++.h>
using namespace std;
int main()
{
    long long a;
    cin>>a;
    for(int i=1;i<=a;i++)
	{
	    long long x;
	    x=(a-i)*2;
		for(int j=1;j<=x;j++)
		{
			cout<<" "; 
		}
		for(int j=1;j<=i;j++)
		{
			cout<<"/\\"<<endl;
			for(int n=1;n<=x-1;n++)
			{
			    cout<<" ";
			}
			cout<<"/_\\"<<endl;
		}
		for(char j=i-1;j>=i-1;j--)
		{
			cout<<"/\\"<<endl;
			for(int n=1;n<=x-1;n++)
			{
			    cout<<" ";
			}
			cout<<"/_\\"<<endl;
		}
		cout<<endl;
	} 
	return 0;
}
2024/7/16 18:08
加载中...