0% found this document useful (0 votes)
25 views1 page

Public Class Private Sub Byval As Byval As Handles Dim For To Next For To If Then End If Next If Then

Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views1 page

Public Class Private Sub Byval As Byval As Handles Dim For To Next For To If Then End If Next If Then

Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

Public Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.

Click Dim f(20), p, tp, k, i, toc, te, c, z, u For k = 1 To 20 f(k) = 40 + 20 * Rnd() Next 1: z = 1 For i = 2 To 20 If f(z) > f(i) Then z = i End If Next If f(z) < 1000 Then c = c + 1 p = -5 * Math.Log(1 - Rnd()) u = 40 + 20 * Rnd() If tp > f(z) Then te = te + tp - f(z) tp = tp + p Else toc = toc + f(z) - tp tp = f(z) + p End If f(z) = tp + u Else TextBox1.Text = toc TextBox2.Text = te / c GoTo 2 End If GoTo 1 2: End Sub End Class

You might also like