先声明我不会,现在是不是更有趣
#include<stdio.h>
void main()
{ int i=1;
void m1();
void m2();
void m3();
void m4();
while(i<=2)
{ i++;
if(i%2!=0)
{m3();
printf("\n");
m4();
printf("\n");}
else {m1();
printf("\n");
m2(); }
}
}
void m1()
{
int i,j;
int m1[5][5]={{0,3,0,0,0},{0,3,0,0,0},{0,3,0,0,0},{0,3,0,0,0},{0,3,3,3,0}};
for(i=0;i<=4;i++)
{printf("\t\t");
for(j=0;j<=4;j++)
printf("%c",m1[i][j]);
printf("\n");
}
}
void m2()
{
int i,j;
int m1[5][5]={{0,1,1,1,0},{0,1,0,1,0},{0,1,0,1,0},{0,1,0,1,0},{0,1,1,1,0}};
for(i=0;i<=4;i++)
{printf("\t\t");
for(j=0;j<=4;j++)
printf("%c",m1[i][j]);
printf("\n");
}
}
void m3()
{
int i,j;
int m1[5][5]={{1,0,0,0,1},{0,1,0,1,0},{0,1,0,1,0},{0,1,0,1,0},{0,0,1,0,0}};
for(i=0;i<=4;i++)
{printf("\t\t");
for(j=0;j<=4;j++)
printf("%c",m1[i][j]);
printf("\n");
}
}
void m4()
{
int i,j;
int m1[5][5]={{0,3,3,3,0},{0,3,0,0,0},{0,3,3,3,0},{0,3,0,0,0},{0,3,3,3,0}};
for(i=0;i<=4;i++)
{ printf("\t\t");
for(j=0;j<=4;j++)
printf("%c",m1[i][j]);
printf("\n");
}
}