title: A program that tutors the user with Addition
body: <p><a href="https://i.stack.imgur.com/9GzCY.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/9GzCY.png" alt="enter image description here"></a>I am creating a C# application that generates two random integers,between 100 to 500.  The numbers should perform addition such that</p>
  
  <pre><code>           247 + 129 = ?
  </code></pre>
  
  <p>The form has a text box for the user to enter the problem's answer.  When a button is clicked, the application should do the following:</p>
  
  <p>Check the user's input and display a message indicating whether it is the correct answer or not.
  Generate two new random numbers and display them in a new problem on the form
   add a button named "Save score to file". </p>
  
  <p>When clicked, this button should write the total number of problems, the number of correct answers as well as the percentage of problems answered correctly. </p>
  
  <p><strong>Code:</strong></p>
  
  <p>InitializeComponent();</p>
  
  <pre><code>        Random rand = new Random();
          {
              int number1;
  
              number1 = rand.Next(400) + 100;
  
              numberLabel1.Text = Convert.ToString(number1);
          }
          {
  
              int number2;
  
              number2 = rand.Next(400) + 100;
              numberLabel2.Text = Convert.ToString(number2);
          }
      }
  
      private void checkButton_Click(object sender, EventArgs e)
      {
  
          int correctAnswer;
          correctAnswer = int.Parse(numberLabel1.Text) + int.Parse(numberLabel2.Text);
          int userAnswer;
          userAnswer = Convert.ToInt32(userInputBox.Text);
  
          if (userAnswer == correctAnswer)
          {
              MessageBox.Show("Your Answer is Correct");
          }
          else
          {
              MessageBox.Show("Your Answer is Incorrect");
          }
      }
      private void clearButton_Click(object sender, EventArgs e)
      {
  
          numberLabel1.Text = "";
          numberLabel2.Text = "";
          userInputBox.Text = "";
      }
  
      private void exitButton_Click(object sender, EventArgs e)
      {
  
          this.Close();
      }
  
      private void answerBox_TextChanged(object sender, EventArgs e)
      {
  
                 }
  }
  </code></pre>
  
  <p>}</p>
  
  <p>The question I have is: How do I get an output? The message box isn't showing and I answer the problem correctly each time. After This how do Generate two new random numbers and display them in a new problem on the form add a button named "Save score to file".</p>
  
  <p>When clicked, this button should write the total number of problems, the number of correct answers as well as the percentage of problems answered correctly.</p>