主题:急求3道题,很简单那种
bngdm
[专家分:0] 发布于 2007-10-16 10:35:00
1.S=1+1/2+1/3+1/4+....1/1000
2.已知三个数,求最大的数为多少?(任意输入3个数)
3.打印如下图:
******
******
******
******
有哪位哥哥姐姐能帮帮忙不?谢谢~!!
回复列表 (共27个回复)
21 楼
水晶白雪 [专家分:20] 发布于 2009-07-30 18:32:00
[quote]1.
dim s as double
s=1
for i=2 to 1000
s=s+1/i
next
print s
end
2.
input a,b,c
max=a
if b>max then max=b
if c>max then max=c
print max
end
3.
FOR i = 1 TO 4
PRINT TAB(i); STRING$(6, "*")
NEXT i
END[/quote]
[em5][em1][em1][em1][em1][em1][em1][em1][em1][em1]
22 楼
水晶白雪 [专家分:20] 发布于 2009-07-30 18:33:00
要给我加分哦!
23 楼
FFKK [专家分:1610] 发布于 2009-08-02 16:52:00
3
cls
for i=1 to 4
? tab (21-i+2);
for j=1 to 4
? "*";
next j
?
next i
end
24 楼
梦幻小樱 [专家分:140] 发布于 2009-08-04 13:05:00
CLS
FOR I=1 TO 1000
S=S +1/I
NEXT I
PRINT "S=";S
END
25 楼
水晶白雪 [专家分:20] 发布于 2009-08-05 14:23:00
[quote]第一题
CLS
s = 1
FOR i = 2 TO 1000
s = s + 1 / i
NEXT i
PRINT s
END
第二题
CLS
DIM a(3)
FOR i = 1 TO 3
INPUT a(i)
NEXT i
FOR i = 1 TO 3 - 1
FOR j = 1+1 TO 3
IF a(j) < a(j + 1) THEN
SWAP a(j), a(j + 1)
END IF
NEXT j
NEXT i
PRINT a(1)
END
第三题
CLS
FOR i = 1 TO 4
PRINT SPC(i - 1);
FOR j = 1 TO 6
PRINT "*";
NEXT j
PRINT
NEXT i[/quote]
26 楼
梦幻小樱 [专家分:140] 发布于 2009-08-06 12:44:00
CLS
DIM a(3)
FOR i = 1 TO 3
INPUT a(i)
NEXT i
FOR i = 1 TO 3 - 1
FOR j = 1+1 TO 3
IF a(j) < a(j + 1) THEN
SWAP a(j), a(j + 1)
END IF
NEXT j
NEXT i
PRINT a(1)
END
27 楼
593170024 [专家分:500] 发布于 2009-10-26 12:29:00
CLS
S = 1
FOR I = 2 TO 1000
S = S + 1 / I
NEXT I
PRINT S
END
CLS
INPUT A, B, C
IF A > B AND A > C THEN PRINT A
IF B > A AND B > C THEN PRINT B
IF C > A AND C > B THEN PRINT C
END
3.
CLS
FOR I = 1 TO 4
PRINT TAB(I); STRING$(6, "*")
NEXT I
END
我来回复