Public Class Form1
Dim num1 As Integer = CInt(Int((10 * Rnd()) + 1))
Dim num2 As Integer = CInt(Int((10 * Rnd()) + 1))
Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
End Sub
Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
' It is meant to display the question on textbox2.text, not the answer
TextBox2.Text = num1 * num2
End Sub
Private Sub TextBox1_TextChanged(sender As System.Object, e As System.EventArgs) Handles TextBox1.TextChanged
If TextBox1.Text = num1 * num2 Then
Label2.Text = "Correct!!11"
Else
Label2.Text = "Incorrect, sorry about that"
End If
End Sub
End Class
textbox2 に「5 * 5」のような質問を表示させたいのですが、代わりに「25」と表示されます