做条超简单的题,因为我不是学计算机的,是帮女性朋友做的,完全不懂,谢谢
编写程序,计算1 + 3 + 5 + … + 99。要求用三种循环语句( for,while,do )书写.
private sub command1_click()
dim i,s as integer
for i=1 to 99
s=s+i
next
end sub
将下面的内容替换为上面的红色部分
i=1
while i<99
s=s+i
loop
i=1
do
s=s+1
i=i+1
while i<100
Private Sub Command1_Click()
Dim I As Integer, S As Integer
S = 0
For I = 1 To 99 Step 2
S = S + I
Next
Print S
I = 1
S = 0
Do While I < 100
S = S + I
I = I + 2
Loop
Print S
I = 1
S = 0
Do
S = S + I
I = I + 2
Loop While I < 100
Print S
End Sub