Dim num As Integer Private Sub Form_Load() Me.Hide Open App.Path & "\in.txt" For Input As #1 Open App.Path & "\out.txt" For Output As #2 Input #1, num For i = 1 To 6 For ii = 1 To 6 For iii = 1 To 6 If i + ii + iii = num Then Print #2, i & " " & ii & " " & iii Next Next Next 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 Input #1, n For i = 1 To 6 For j = 1 To 6 For k = 1 To 6 If i + j + k = n Then Print #2, i & " " & j & " " & k Next Next Next 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 Input #1, x For a = 1 To 6 For b = 1 To 6 For C = 1 To 6 If a + b + C = x Then Print #2, a & " " & b & " " & C Next Next Next Close Close End End Sub
Dim num As Integer
回覆刪除Private Sub Form_Load()
Me.Hide
Open App.Path & "\in.txt" For Input As #1
Open App.Path & "\out.txt" For Output As #2
Input #1, num
For i = 1 To 6
For ii = 1 To 6
For iii = 1 To 6
If i + ii + iii = num Then Print #2, i & " " & ii & " " & iii
Next
Next
Next
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
Input #1, n
For i = 1 To 6
For j = 1 To 6
For k = 1 To 6
If i + j + k = n Then Print #2, i & " " & j & " " & k
Next
Next
Next
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
Input #1, x
For a = 1 To 6
For b = 1 To 6
For C = 1 To 6
If a + b + C = x Then Print #2, a & " " & b & " " & C
Next
Next
Next
Close
Close
End
End Sub