Home > Software engineering >  Bosses teach please, had better have a look at the code, thank you very much
Bosses teach please, had better have a look at the code, thank you very much

Time:11-08

Independent with the Do While... Loop and the Do... Loop Untile completed two events process, on the forms to realize four "learning VB", each time followed by the number of occurrences of,

CodePudding user response:

Code:
 Dim a As Integer=0 'set a variable 
The Do While a & lt;> 4 'cycle until the variable is 4
Console. WriteLine (" learning VB & amp;" A) 'output learning vb + variable a
A=a + 1
Loop

The results

This is vb.net code, not with vb6.0 by use, should be a general?

CodePudding user response:

I also wrote a, using VB6:
 
Option Explicit

Private Sub Command1_Click ()
Dim As Integer I
I=1
The Do While I & lt;=4
Print "learning VB & amp;" I
I=I + 1
Loop
End Sub

Private Sub Command2_Click ()
Dim As Integer I
I=0
Do
I=I + 1
Print "learning VB & amp;" I
Loop Until I=4
End Sub

Download address:
Link: https://pan.baidu.com/s/1sAQP8WX918wQOIDBxHi9XQ
The extracted code: 6 eyh

Run the example:
  • Related