Private Sub Command1_Click()
endtime = Now
passtime = endtime - startime
Label2.Caption = Format(endtime, "hh:mm:ss")
Label3.Caption = Format(passtime, "hh:mm:ss")
Command2.Enabled = False
Command1.Enabled = True
End Sub
Private Sub Command2_Click()
Cls
Dim a(100000) As Integer
Dim i As Integer
Dim j As Integer
startime = Now
Label1.Caption = Format(startime, "hh:mm:ss")
endtime = Now
passtime = endtime - startime
Label2.Caption = Format(endtime, "hh:mm:ss")
Label3.Caption = Format(passtime, "hh:mm:ss")
Command2.Enabled = False
Command1.Enabled = True
End Sub
Private Sub Command2_Click()
Cls
Dim a(100000) As Integer
Dim i As Integer
Dim j As Integer
startime = Now
Label1.Caption = Format(startime, "hh:mm:ss")
Label2.Caption = ""
Label3.Caption = ""
Command1.Enabled = False
Command2.Enabled = True
For i = 1 To 100000
a(i) = Int(Rnd * 100)
Print a(i);
Next i
Print
For i = 1 To 99999
For j = i + 1 To 100000
If a(j) > a(i) Then
swap a(i), a(j)
End If
Next j
Next i
For i = 1 To 100000
Print a(i);
Next i
End Sub
Private Sub swap(a As Integer, b As Integer)
Dim t As Integer
t = a
a = b
b = t
End Sub
Private Sub Command1_Click()
endtime = Now
passtime = endtime - startime
Label2.Caption = Format(endtime, "hh:mm:ss")
Label3.Caption = Format(passtime, "hh:mm:ss")
Command2.Enabled = False
Command1.Enabled = True
End Sub
Private Sub Command2_Click()
Cls
Dim a(100000) As Integer
Dim i As Integer
Dim j As Integer
startime = Now
Label1.Caption = Format(startime, "hh:mm:ss")
Label2.Caption = ""
Label3.Caption = ""
Command1.Enabled = False
Command2.Enabled = True
For i = 1 To 100000
a(i) = Int(Rnd * 100)
Print a(i);
Next i
Print
For i = 1 To 99999
For j = i + 1 To 100000
If a(j) > a(i) Then
swap a(i), a(j)
End If
Next j
Next i
For i = 1 To 100000
Print a(i);
Next i
End Sub
Private Sub swap(a As Integer, b As Integer)
Dim t As Integer
t = a
a = b
b = t
End Sub
Private Sub Command1_Click()
endtime = Now
passtime = endtime - startime
Label2.Caption = Format(endtime, "hh:mm:ss")
Label3.Caption = Format(passtime, "hh:mm:ss")
Command2.Enabled = False
Command1.Enabled = True
End Sub
Private Sub Command2_Click()
Cls
Dim a(100000) As Integer
Dim i As Integer
Dim j As Integer
startime = Now
Label1.Caption = Format(startime, "hh:mm:ss")
Label2.Caption = ""
Label3.Caption = ""
Command1.Enabled = False
Command2.Enabled = True
For i = 1 To 100000
a(i) = Int(Rnd * 100)
Print a(i);
Next i
Print
For i = 1 To 99999
For j = i + 1 To 100000
If a(j) > a(i) Then
swap a(i), a(j)
End If
Next j
Next i
For i = 1 To 100000
Print a(i);
Next i
End Sub
Private Sub swap(a As Integer, b As Integer)
Dim t As Integer
t = a
a = b
b = t
End Sub
Private Sub Command1_Click()
endtime = Now
passtime = endtime - startime
Label2.Caption = Format(endtime, "hh:mm:ss")
Label3.Caption = Format(passtime, "hh:mm:ss")
Command2.Enabled = False
Command1.Enabled = True
End Sub
Private Sub Command2_Click()
Cls
Dim a(100000) As Integer
Dim i As Integer
Dim j As Integer
startime = Now
Label1.Caption = Format(startime, "hh:mm:ss")
Label2.Caption = ""
Label3.Caption = ""
Command1.Enabled = False
Command2.Enabled = True
For i = 1 To 100000
a(i) = Int(Rnd * 100)
Print a(i);
Next i
Print
For i = 1 To 99999
For j = i + 1 To 100000
If a(j) > a(i) Then
swap a(i), a(j)
End If
Next j
Next i
For i = 1 To 100000
Print a(i);
Next i
End Sub
Private Sub swap(a As Integer, b As Integer)
Dim t As Integer
t = a
a = b
b = t
End Sub
Label3.Caption = ""
Command1.Enabled = False
Command2.Enabled = True
For i = 1 To 100000
a(i) = Int(Rnd * 100)
Print a(i);
Next i
For i = 1 To 99999
For j = i + 1 To 100000
If a(j) > a(i) Then
swap a(i), a(j)
End If
Next j
Next i
For i = 1 To 100000
Print a(i);
Next i
End Sub
Private Sub swap(a As Integer, b As Integer)
Dim t As Integer
t = a
a = b
b = t
End Sub
Private Sub Command1_Click()
endtime = Now
passtime = endtime - startime
Label2.Caption = Format(endtime, "hh:mm:ss")
Label3.Caption = Format(passtime, "hh:mm:ss")
Command2.Enabled = False
Command1.Enabled = True
End Sub
Private Sub Command2_Click()
Cls
Dim a(100000) As Integer
Dim i As Integer
Dim j As Integer
startime = Now
Label1.Caption = Format(startime, "hh:mm:ss")
Label2.Caption = ""
Label3.Caption = ""
Command1.Enabled = False
Command2.Enabled = True
For i = 1 To 100000
a(i) = Int(Rnd * 100)
Print a(i);
Next i
For i = 1 To 99999
For j = i + 1 To 100000
If a(j) > a(i) Then
swap a(i), a(j)
End If
Next j
Next i
For i = 1 To 100000
Print a(i);
Next i
End Sub
Private Sub swap(a As Integer, b As Integer)
Dim t As Integer
t = a
a = b
b = t
End Sub
Private Sub Command1_Click()
endtime = Now
passtime = endtime - startime
Label2.Caption = Format(endtime, "hh:mm:ss")
Label3.Caption = Format(passtime, "hh:mm:ss")
Command2.Enabled = False
Command1.Enabled = True
End Sub
Private Sub Command2_Click()
Cls
Dim a(100000) As Integer
Dim i As Integer
Dim j As Integer
startime = Now
Label1.Caption = Format(startime, "hh:mm:ss")
Label2.Caption = ""
Label3.Caption = ""
Command1.Enabled = False
Command2.Enabled = True
For i = 1 To 100000
a(i) = Int(Rnd * 100)
Print a(i);
Next i
For i = 1 To 99999
For j = i + 1 To 100000
If a(j) > a(i) Then
swap a(i), a(j)
End If
Next j
Next i
For i = 1 To 100000
Print a(i);
Next i
End Sub
Private Sub swap(a As Integer, b As Integer)
Dim t As Integer
t = a
a = b
b = t
End Sub
Private Sub Command1_Click()
endtime = Now
passtime = endtime - startime
Label2.Caption = Format(endtime, "hh:mm:ss")
Label3.Caption = Format(passtime, "hh:mm:ss")
Command2.Enabled = False
Command1.Enabled = True
End Sub
Private Sub Command2_Click()
Cls
Dim a(100000) As Integer
Dim i As Integer
Dim j As Integer
startime = Now
Label1.Caption = Format(startime, "hh:mm:ss")
Label2.Caption = ""
Label3.Caption = ""
Command1.Enabled = False
Command2.Enabled = True
For i = 1 To 100000
a(i) = Int(Rnd * 100)
Print a(i);
Next i
For i = 1 To 99999
For j = i + 1 To 100000
If a(j) > a(i) Then
swap a(i), a(j)
End If
Next j
Next i
For i = 1 To 100000
Print a(i);
Next i
End Sub
Private Sub swap(a As Integer, b As Integer)
Dim t As Integer
t = a
a = b
b = t
End Sub