c++回形方阵基本算法

#include
using namespace std;
int main()
{
	int n;
	cin>>n;
	for(int i=1;i<=2*n+1;i++)
	cout<0;h--)
				cout<<(n-h)<<"  ";
			cout<=1;j--)
		{
			cout<0;h--)
				cout<<(n-h)<<"  ";
			cout<=1;--j)
              cout <

运行结果:

c++回形方阵基本算法_第1张图片





你可能感兴趣的:(算法)