Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim n As Integer
FileOpen(1, "c:\1060302.txt", OpenMode.Input)
Input(1, n)
FileClose()
Dim i, j As Integer
Dim ans As String
ans = "第二題結果:" & vbNewLine
For i = 1 To n
For j = 1 To i
ans &= j
Next
ans &= vbNewLine
Next
TextBox2.Text = ans
End Sub
沒有留言:
張貼留言