引用 | 编辑
pk01749276
2005-11-08 01:20 |
楼主
▼ |
||
x0
如何用FOR回圈排出菱形--------*---------------------- -------* *-------------------- ------* * *------- .. 访客只能看到部份内容,免费 加入会员 x0
|
引用 | 编辑
pk01749276
2005-11-11 00:05 |
3楼
▲ ▼ |
我知道有文章阿!!
但我是要*和*之间要有空白咩 且第一行就要先有4个空白 才开始继续做.... x0 |
引用 | 编辑
mmpo
2005-11-12 10:09 |
4楼
▲ |
你不会连改都不会改吧
#include <stdio.h> #include <stdlib.h> void test(int max,int now){ if(now==-max) return ; test(max,now-1); printf("%.*s",now<1?-now:now," "); printf("%.*s \n",(max-(now<1?-now:now))*2,"* * * * * * * * * * * * * * * * * "); } int main(){ int n=5; test(n,n); system("pause"); } x0 |