求字母塔的代码^_^
pascal吧
全部回复
仅看楼主
level 1
sharkyc 楼主
求个题 我是新手^_^"输出一个字母塔如下 A ABA ABCBA …… ABCDE…………EDCBA代码加点注释,谢谢了。可以加我QQ263741061 各位高手教教我^_^
2006年06月14日 13点06分 1
level 1
这个程序太简单了,一目了然,我看不用加注释了吧?var c,d:char;beginfor c:='A' to 'Z' dobeginfor d:=succ(c) to 'Z' do write(' ');for d:='A' to c do write(d);for d:=pred(c) downto 'A' do write(d);writelnend;readlnend.
2006年06月14日 15点06分 2
level 1
贴吧真会搞乱!楼上的(c)应该是括号里有个字母c。var c,d:char;beginfor c:='A' to 'Z' dobeginfor d:=succ( c) to 'Z' do write(' ');for d:='A' to c do write(d);for d:=pred( c) downto 'A' do write(d);writelnend;readlnend.
2006年06月14日 15点06分 3
level 1
括号里写个字母c只要发到帖子上就变成了圆圈里有个c。
2006年06月14日 15点06分 4
level 0
我试试(c)
2006年06月15日 09点06分 5
level 0
哇,真的可以啊!
2006年06月15日 09点06分 6
level 0
(c)
2006年06月15日 13点06分 7
level 2
program pb;var n,i,j:byte;{n为小于26的整数 故使用byte}st1,st2:string[25];{控制输出 也可以用两个循环实现}c:char;{控制输出的字符}begin readln(n);//input for i:=1 to n do begin for j:=1 to n-i do write(' ');//行前空格 c:='a';st1:='';st2:='';//初始化 for j:=1 to i-1 do begin st1:=st1+c;//在st1和st2中添加字符 st2:=c+st2; inc(c);//控制字符进位 end; writeln(st1,c,st2);//输出 end;end.
2006年06月16日 12点06分 8
level 0
abc
2006年06月18日 13点06分 10
level 0
7楼的没3楼的省事。
2006年06月21日 15点06分 11
level 2
(c)
2006年07月03日 07点07分 12
level 1
(I)(c)
2006年07月03日 08点07分 13
level 1
(C)
2006年07月03日 08点07分 14
level 1
(c)
2006年07月03日 08点07分 15
level 0
(a)
2006年07月03日 09点07分 16
level 0
(c)
2006年07月03日 09点07分 17
level 0
(c)
2006年07月03日 11点07分 18
level 0
C
2006年07月06日 11点07分 19
level 0
(c)
2006年07月06日 13点07分 20
level 0
(c)
2006年07月06日 13点07分 21
1 2 3 4 5 尾页