Randomize() '1から100の間で5つの数字を取り出す numA.Text = CInt(Int((20 - 1) + 1) * Rnd() + 1) numB.Text = CInt(Int((40 - 21) + 1) * Rnd() + 21) numC.Text = CInt(Int((60 - 41) + 1) * Rnd() + 41) numD.Text = CInt(Int((80 - 61) + 1) * Rnd() + 61) numE.Text = CInt(Int((100 - 81) + 1) * Rnd() + 81)
Private Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click krp = True response = response + 1 result.Text = Str(response) Label1.Text = Tokuten Select Case response Case numA.Text, numB.Text, numC.Text, numD.Text, numE.Text Tokuten = Tokuten + 1 End Select