Private Sub Form_Load() Me.Hide Open App.Path & "\out.txt" For Output As #1 n = 0.5 Do n = n * 2 i = i + 1 Loop Until n > 15000000000000# Print #1, i Close #1 End End Sub
Private Sub Form_Load() Me.Hide n = 0.5 Do Until n >= Val(150000000000#) i = i + 1 n = n * 2 Loop Open App.Path & "\out.txt" For Output As #1 Print #1, i Close End End Sub
Dim distance As Double Dim ori As Double Private Sub Form_Load() Me.Hide ori = 0.5 distance = 150000000000# i = 0 Do ori = ori * 2 i = i + 1 Loop Until ori > distance Open App.Path & "\out.txt" For Output As #2 Print #2, i Close End Sub
Dim distance As Double
回覆刪除Dim ori As Double
Private Sub Form_Load()
ori = 0.5
distance = 150000000000#
i = 0
Do
ori = ori * 2
i = i + 1
Loop Until ori > distance
Open App.Path & "\out.txt" For Output As #1
Print #1, i
Close #1
End Sub
Private Sub Form_Load()
回覆刪除Me.Hide
Open App.Path & "\out.txt" For Output As #1
n = 0.5
Do
n = n * 2
i = i + 1
Loop Until n > 15000000000000#
Print #1, i
Close #1
End
End Sub
Private Sub Form_Load()
回覆刪除Me.Hide
n = 0.5
Do Until n >= Val(150000000000#)
i = i + 1
n = n * 2
Loop
Open App.Path & "\out.txt" For Output As #1
Print #1, i
Close
End
End Sub
復陞終點多一個0
回覆刪除Bob & KiKi 程式正確
(說錯,兩個0)
刪除Dim distance As Double
回覆刪除Dim ori As Double
Private Sub Form_Load()
Me.Hide
ori = 0.5
distance = 150000000000#
i = 0
Do
ori = ori * 2
i = i + 1
Loop Until ori > distance
Open App.Path & "\out.txt" For Output As #2
Print #2, i
Close
End Sub