title: c# Simple score system
body: <p>I'm making a simple game. I'm trying to give the player a +1 score when he has a answer correct, but It keeps saying the same score 1. I want to have the score constantly updated when your answer is correct.</p>
  
  <p>So if you have two answers correct, the score should update to 2, but it doesn't and keeps saying 1...</p>
  
  <pre><code>        start:
  
          Random numbergenerator = new Random ();
  
          int num1 = numbergenerator.Next(1,11);
          int num2 = numbergenerator.Next(1,11);
          int score = 0; // THIS IS THE SCORE
  
          Console.WriteLine("Whats " + num1 + " times " + num2 + "?");
  
          var answer = Convert.ToInt32(Console.ReadLine());
  
          if ( answer == num1 * num2) {
              Console.ForegroundColor = ConsoleColor.Green;
              Console.WriteLine("Thats the correct answer!");
              Console.ResetColor();
              ++score; // Gives score
              Console.WriteLine("Your score: " + score);
          } else {
              Console.ForegroundColor = ConsoleColor.Red;
              Console.WriteLine("Bummer, try again!");
              Console.ResetColor();
              ++score; // Gives score
              Console.WriteLine("Your score: " + score);
          }
          goto start;
      }
  }
  </code></pre>
  
  <p>}</p>