求写VB6一个程序
已知:X=5 Y=3使用Open "C:\Users\Administrator\Desktop\1.txt" For Append As #1语句,写出如下规律的数字
格式为:X,Y
0,0
0,1
0,2
0,3
1,0
1,1
1,2
1,3
2,0
2,1
2,2
2,3
……
[此贴子已经被作者于2020-6-30 16:16编辑过]
Private Sub Form_Load() Dim X As Integer Dim Y As Integer X = 0: Y = 0 For Y = 0 To 3 Open "C:\Users\Administrator\Desktop\1.txt" For Append As #1 Print #1, X & "," & Y If Y = 3 Then Y = -1 X = X + 1 If X > 5 Then Exit For End If Close #1 Next End Sub
[此贴子已经被作者于2020-6-30 17:00编辑过]