LblIncorrect.Text = intInCorrect.ToString ' keeps track of the number of correct and incorrect responsesĭim x, intNum1, intNum2, intUserAnswer, intCorrectAnswer As Integer That’s why with ThinkAutomation, you can set up your if statements with no coding necessary.
But even if you understand how they work, writing if statements with code is still a daunting task. With them, you can automate simple actions or even detailed workflows. ' calculates the correct answer and then compares the correct answer to the user's answer If statements are the foundation of a rule-based system. Private Sub btnAnswer_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnAnswer.Click Private Sub btnStart_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnStart.Click
Private Sub btnExit_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnExit.Click LblNum2.Text = Convert.ToString(intRandom2) LblNum1.Text = Convert.ToString(intRandom1) ' generates and displays two random integers
(This is a homework assignment, so please keep that in mind. I have attached a copy of my code with the hope that someone here can give me some insight as to what I am missing. I have been struggling with this for 4 days - Please help.