#include<iostream>
#include<iomanip>
using namespace std;
void Spiraloutput() {
cout << "■■■■■■■■■■■■■■■■■■■" << endl;
cout << "■ 螺旋输出 ■" << endl;
cout << "■■■■■■■■■■■■■■■■■■■" << endl;
cout << "请输入数字n:";
int n, sz;
cin >> n;
sz = sqrt(n);
// 找到一个最小方阵
while (sz*sz < n) {
sz++;
}
int **a = new int*[sz];
for (int i = 0; i < sz; i++) {
a[i] = new int[sz];
}
for
c++:螺旋输出
最新推荐文章于 2022-10-23 15:59:22 发布