1. 螺旋矩阵 (10 分)

1. 螺旋矩阵 (10 分)#

输入一个数 m, 完成两个函数 fill()print(), 使得程序运行结果如下所示.

main.cpp#
 1#include <cstring>
 2#include <iostream>
 3#include <string>
 4
 5using namespace std;
 6
 7int main() {
 8  int m;
 9  cin >> m;
10  int num[5][5] = {};
11  char ch[5][5] = {};
12  fill(num, ch, m);
13  print(num, ch, m);
14  return 0;
15}
 1输入: 4
 2输出:
 31   2   3   4
 412  13  14  5
 511  16  15  6
 610  9   8   7
 7a   b   c   d
 8l   m   n   e
 9k   p   o   f
10j   i   h   g