看不懂题解求助
查看原帖
看不懂题解求助
948951
yzsy25071621楼主2023/8/22 21:10

真的看不懂

耗好几个小时了,评论区求续写

悬赏一关

代码( 简单易懂 ):

#include <iostream>
#include <string>

using namespace std;

void print(int);

int n,totLength;
string S[2]={"/\\","/_\\"};

int main()
{
	cin>>n;
	totLength=1<<n;
	print(1);
	return 0;
}

void print(int line)//line 当前打印行数
{
	for(int i=1; i<=totLength-line; i++)
	{
		cout<<" ";
	}
	//写不下去力(悲
}

多谢神犇

2023/8/22 21:10
加载中...