Private Sub Form_Load() Me.Hide Open App.Path & "\in.txt" For Input As #1 Open App.Path & "\out.txt" For Output As #2 Do While Not EOF(1) Input #1, n Print #2, (n + 1) * (n ^ 2 - n + 6) / 6 Loop Close Close End End Sub
Private Sub Form_Load() Me.Hide Open App.Path & "\in.txt" For Input As #1 Open App.Path & "\out.txt" For Output As #2 Do While Not EOF(1) Input #1, n Print #2, (n + 1) * (n ^ 2 - n + 6) / 6 Loop Close #2 Close #1 End End Sub
Private Sub Form_Load()
回覆刪除Me.Hide
Open App.Path & "\in.txt" For Input As #1
Open App.Path & "\out.txt" For Output As #2
Do While Not EOF(1)
Input #1, n
Print #2, (n + 1) * (n ^ 2 - n + 6) / 6
Loop
Close
Close
End
End Sub
作者已經移除這則留言。
回覆刪除Private Sub Form_Load()
刪除Me.Hide
Open App.Path & "\in.txt" For Input As #1
Open App.Path & "\out.txt" For Output As #2
Do While Not EOF(1)
Input #1, n
Print #2, (n + 1) * (n ^ 2 - n + 6) / 6
Loop
Close #2
Close #1
End
End Sub