Реферат: Использование языка программирования Visual Basic для решения математических задач
n = 500
Dim x(10), y(10)
Randomize (Label2.Caption)
For i = 1 To 2
a = -6.28 * Rnd / 2
rn = r * Rnd
xc = X1 + 400 + rn * 1.5 * Cos(a)
yc = Y1 + 5600 + rn * 5 * Sin(a)
PSet (xc, yc), &HFFFF80 * Rnd + &HC0C0FF * Rnd
Next
If Label1.Caption > 200 Then Timer2.Interval = 0
End Sub
Private Sub Timer4_Timer()
If Label4.Caption < 200 Then Timer5.Interval = 1
End Sub
Private Sub Timer5_Timer()
X0 = Label5.Caption
Y0 = -Label4.Caption
r = 100
n = 100
Dim x(100), y(100)
Randomize (Label2.Caption)
For i = 1 To 5
a = -6.28 * Rnd / 2
rn = r * Rnd
xc = X0 + 400 + rn * 3 * Cos(a)
yc = Y0 + 5600 + rn * 5 * Sin(a)
PSet (xc, yc), &HFFFF80 * Rnd + &HC0C0FF * Rnd
If Label17.Caption < 150 Then Timer1.Interval = 0