title: Console (Input string was not in correct format)
body: <p>Hi guys so i'm starting to learn C# and I came up with this problem when I  was trying to mix things up</p>
  
  <p>It says "Input string was not in correct format" at the
  n = Convert.ToInt32(Console.ReadLine());</p>
  
  <p>Here's the whole code</p>
  
  <pre><code>namespace Exercise13
  {
      class Program
      {
          static void Main(string[] args)
          {
              char choice;
              Console.Write("What operation would you like to use?");
              Console.WriteLine("\na. Addition \tb. Subtraction \tc.Multiplication \td.Division");
              choice = (char)Console.Read();
              if (choice == 'a')
              {
                  sumValues();
              }
              else if (choice == 'b') 
              {
                  minusValues();
              }
              else if (choice == 'c') 
              {
                  timesValues();
              }
              Console.ReadLine();
  
          }
          static void sumValues() 
          {
  
  
              int n = 0;
              int sum = 0;
              int i = 0,val = 0;
              Console.Write("How many numbers do you want calculate: ");
              n = Convert.ToInt32(Console.ReadLine());            
  
              for (i = 0; i &lt; n; i++) 
              {
                  Console.Write("\nInput number: ");
                  val = Convert.ToInt32(Console.ReadLine());
                  sum += val;
  
              }
              Console.Write("\nThe Answer is: "+sum);
  
          }
          static void minusValues() 
          {
              int diff = 0, m, z, value;
              Console.Write("How many numbers do you want calculate: ");
              m = int.Parse(Console.ReadLine());
              for (z = 0; z &lt; m; z++)
              {
                  Console.Write("\nInput number: ");
                  value = int.Parse(Console.ReadLine());
                  diff -= value;
  
              }
              Console.Write("\nThe Answer is: " + diff);
  
          }
          static void timesValues()
          {
              int prod = 0, e, i, val;
              Console.Write("How many numbers do you want to calculate: ");
              e = Convert.ToInt32(Console.ReadLine());
              for (i = 0; i &lt; e; i++) 
              {
                  Console.Write("\nInput number: ");
                  val = int.Parse(Console.ReadLine());
                  prod *= val;
              }
              Console.Write("\nThe answer is: " + prod);
          }
      }
  }
  </code></pre>