主题:考考大家
小心哦哦
[专家分:140] 发布于 2010-06-01 16:52:00
打印出以下图形
A
BAB
CBABC
DCBABCD
EDCBABCDE
DCBABCD
CBABC
BAB
A
BAB
CBABC
DCBABCD
EDCBABCDE
DCBABCD
CBABC
BAB
A
回复列表 (共9个回复)
沙发
幽灵密码 [专家分:3510] 发布于 2010-10-19 22:22:00
PRINT " A "
PRINT " BAB "
PRINT " CBABC "
PRINT " DCBABCD "
PRINT "EDCBABCDE"
PRINT " DCBABCD "
PRINT " CBABC "
PRINT " BAB "
PRINT " A "
PRINT " BAB "
……(以下省略)
1000000000000%正确!
板凳
huangyb731 [专家分:630] 发布于 2010-10-25 21:47:00
毙了你!!!!!!!!!!!!!!
还有:
杀了你!!
回复幽灵密码的
3 楼
幽灵密码 [专家分:3510] 发布于 2010-10-26 17:16:00
你杀不死我
你杀不死我
print“你杀不死我!”
4 楼
huangyb731 [专家分:630] 发布于 2010-10-27 22:42:00
print“ A”
print“ BAB"
print“ CBABC"
print“ DCBABCD"
print“EDCBABCDE"
print“ DCBABCD"
print“ CBABC"
print“ BAB"
print“ A"
print“ BAB"
print“ CBABC"
print“ DCBABCD"
print“EDCBABCDE"
print“ DCBABCD"
print“ CBABC"
print“ BAB"
print“ A"
幽灵啊,帮我做道题——
甲乙丙三人共有384本书,先由甲分给乙、丙,所给书数分别等于乙、丙已有的书数,在由乙分给甲、丙,最后由丙分给甲、乙,方法同前,结果三人书数相等。编程求甲、乙、丙原有多少书?
5 楼
幽灵密码 [专家分:3510] 发布于 2010-10-28 18:50:00
帮你做过了,就在你那贴里
6 楼
LZJQB [专家分:140] 发布于 2010-10-29 20:09:00
应该这样:
CLS
A$ = "EDCBABCDE"
N = 5
FOR I = -4 TO 4
P = ABS(I)
P = 4 - P
PRINT TAB(40 - P);
S = 2 * P + 1
B$ = MID$(A$, N, S)
PRINT B$
IF I < 0 THEN N = N - 1 ELSE N = N + 1
NEXT I
N = 5
FOR I = -4 TO 4
P = ABS(I)
P = 4 - P
PRINT TAB(40 - P);
S = 2 * P + 1
B$ = MID$(A$, N, S)
PRINT B$
IF I < 0 THEN N = N - 1 ELSE N = N + 1
NEXT I
END
7 楼
幽灵密码 [专家分:3510] 发布于 2010-10-31 00:25:00
楼上程序有误,在第10行多输出了一个“A”。
8 楼
幽灵密码 [专家分:3510] 发布于 2010-10-31 00:27:00
程序这样改:
CLS
A$ = "EDCBABCDE"
N = 5
FOR i = -4 TO 4
P = ABS(i)
P = 4 - P
PRINT TAB(40 - P);
S = 2 * P + 1
B$ = MID$(A$, N, S)
PRINT B$
IF i < 0 THEN N = N - 1 ELSE N = N + 1
NEXT i
N = 5
FOR i = -4 TO 4
P = ABS(i)
P = 4 - P
IF i <> -4 THEN
PRINT TAB(40 - P);
S = 2 * P + 1
B$ = MID$(A$, N, S)
PRINT B$
IF i < 0 THEN N = N - 1 ELSE N = N + 1
END IF
NEXT i
END
9 楼
verysmartboy [专家分:1260] 发布于 2010-11-08 21:44:00
CLS
A$ = "EDCBABCDE"
N = 5
FOR I = -4 TO 4
P = ABS(I)
P = 4 - P
PRINT TAB(40 - P);
S = 2 * P + 1
B$ = MID$(A$, N, S)
PRINT B$
IF I < 0 THEN N = N - 1 ELSE N = N + 1
NEXT I
N = 5
FOR I = -4 TO 4
P = ABS(I)
P = 4 - P
PRINT TAB(40 - P);
S = 2 * P + 1
B$ = MID$(A$, N, S)
IF B$<>"A" THEN PRINT B$
IF I < 0 THEN N = N - 1 ELSE N = N + 1
NEXT I
END
我来回复