程序代码:
#include<stdio.h> int min(int x,int y); int main( void ) { unsigned i=0; unsigned j=0; for (i=7;i;--i) for (j=7;j!=-1;--j) putchar("\nwxyz"[min(min(8-i,i),min(8-j,j))]); return 0; } int min(int x,int y) { return x<y?x:y; }
#include<stdio.h> int min(int x,int y); int main( void ) { unsigned i=0; unsigned j=0; for (i=7;i;--i) for (j=7;j!=-1;--j) putchar("\nwxyz"[min(min(8-i,i),min(8-j,j))]); return 0; } int min(int x,int y) { return x<y?x:y; }
#include<stdio.h> #define N 12 int min(int x,int y); int main( void ) { unsigned i=0; unsigned j=0; char* str="abcdefghijklmnopqrstuvwxyz"; for (i=N*2-1;i;--i) for (j=N*2-1;j!=-1;--j) putchar(j?str[25-N+min(min(N*2-i,i),min(N*2-j,j))]:'\n'); return 0; } int min(int x,int y) { return x<y?x:y; }
[此贴子已经被作者于2017-11-20 16:30编辑过]