摘要:
1.输入一个n ,然后在屏幕上打印出NxN 的矩阵! 例如,输入一个3,则 1 2 3 8 9 4 7 6 5 输入一个4,则 1 2 3 4 12 13 14 5 11 16 15 6 10 9 8 7#include <iostream>
#include <iomanip>
using namespace std; void PrintMatrix(int n)
{ if (n <= 1) { cout << n << endl; return; } //分配空间 int **matrix = new int*[n]; for (in 阅读全文