How to make the periphery of a rectangle the same number in C language
This article mainly introduces how to make the periphery of a rectangle in c language for the same number, the article is very detailed, has a certain reference value, interested friends must read it!
The periphery of a rectangle is the same number, and one circle is added first, and the first circle is 1.
Example
11111
12221
12321
12221
11111
# include
# define N 7
Void fun (int (* a) [N])
{int i,j,k,m
If (N% 2cm / 0) m=N/2
Else m=N/2+1
For (iTuno; I