/* Note:Your choice is C IDE */ #include void main() { int x,y,z; for(x=0;x<=4;x++) { printf(" "); for(y=0;y<=3-x;y++) printf(" "); for(z=0;z<=2*x;z++) printf("*"); printf("\n"); } for(x=0;x<=4;x++) { for(y=0;y<=x;y++) printf(" "); for(z=0;z<=8-2*x;z++) printf("*"); { printf(" "); for(y=0;y<=x;y++) printf(" "); for(z=0;z<=8-2*x;z++) printf("*"); } printf("\n"); } for(x=0;x<=4;x++) { printf(" "); for(y=0;y<=3-x;y++) printf(" "); for(z=0;z<=2*x;z++) printf("*"); { printf(" "); for(y=0;y<=3-x;y++) printf(" "); for(z=0;z<=x*2;z++) printf("*"); } printf("\n"); } for(x=0;x<=4;x++) { printf(" "); for(y=0;y<=x;y++) printf(" "); for(z=0;z<=8-2*x;z++) printf("*"); printf("\n"); } { printf("ID:2013304138\n"); } }
总结:尽管内容重复太多,但是有些地方还是得一次次地修改,不然对不上位置,图形不复杂,程序也简单,但是还是花了心思,请老师高抬贵手