English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
所有分類

s=4+9+13+18+...99
using for...next
  do....loop until
  while...wend
  do while...loop

2007-01-09 16:26:12 · 1 個解答 · 發問者 夏 雨天 4 in 電腦與網際網路 程式設計

1 個解答

Private Sub Command1_Click()
Dim i As Integer, j As Integer, a As Integer, s As Integer
i = 5: j = 4: a = 4: s = 0
Do
s = s + a
a = a + i
If (a <= 99) Then
s = s + a
End If
a = a + j
Loop While (a <= 99)
Print "sum = " & s
End sub
如果有問題, 請來函討論. 不然, 我可能會錯失你再補充的疑點.

2007-01-10 00:04:29 · answer #1 · answered by JJ 7 · 0 0

fedest.com, questions and answers