Description: /* 实现效果: 1 2 6 7 15 3 5 8 14 16 4 9 13 17 22 10 12 18 21 23 11 19 20 24 25 */ #include
#define N 5 //阶数,即N*N的螺旋矩阵 void main() { int i, j, num=1, a[N][N]; for(i=0; i<=N/2; i++) { for(j=i; j
Platform: |
Size: 4395 |
Author: good@588 |
Hits: