3.
Private Sub Command1_Click() Me.Cls Dim n%(10), i%, j%, t% Randomize For i = 1 To 10 n(i) = Int(Rnd * 101) - 50 Next For i = 1 To 9 For j = i + 1 To 10 If n(i) > n(j) Then t = n(i): n(i) = n(j): n(j) = t Next j Next i For i = 1 To 10 Print n(i) Next
End Sub
1.
Private Sub Command1_Click() Dim s$, a%(26), n%, i%, j% s = Text1 For i = 1 To Len(s) n = Asc(UCase(Mid(s, i, 1))) - 64 If n >= 1 And n <= 26 Then a(n) = a(n) + 1 Next i j = 0 For i = 1 To 26 If a(i) <> 0 Then s = Chr(i + 64) + "=" + Str(a(i)) Picture1.Print s; Spc(3); j = j + 1 If j Mod 5 = 0 Then Picture1.Print End If Next i
End Sub