title: storing user input into an array and referring to the array c#
body: <p>This code works properly well but it doesn't have a memory for storing user input.</p>
  
  <p>I also need to categorize the grades into its respective columns in array format, having "S/N, Category and Count" and I dont know how to go about it. Any help would be appreciated.</p>
  
  <pre><code>namespace ExamScore
  {    
      class YourExamScore
      {    
          private static string GetGrade(int examScore)
          {
              if (examScore &gt;= 90 &amp;&amp; examScore &lt;= 100)
                  return "Excellent";
  
              if (examScore &gt;= 70 &amp;&amp; examScore &lt;= 89)
                  return "Good";
  
              if (examScore &gt;= 50 &amp;&amp; examScore &lt;= 69)
                  return "Satisfactory";
  
              if (examScore &gt;= 0 &amp;&amp; examScore &lt;= 49)
                  return "Unsatisfactory";
  
              return "Invalid";    
          }    
  
          static void Main(string[] args)
          { 
              // Print a greeting message.  After all, why not?
              Console.WriteLine("Welcome to ExamScore Calculator!");
  
              Console.WriteLine("Input Your Exam Score...");
              Console.WriteLine("Press -2 when you have inputed all scores");
              while (true)
              {
                  var examScore = Convert.ToInt32(Console.ReadLine());
                  if (examScore == -2)
                  {
                      break;
                  }
  
                  var grade = GetGrade(examScore);
                  Console.WriteLine(grade);
              }
              Console.WriteLine("\n\nProccessing Scores... Please Wait...");
              Console.ReadLine();
          }
  
      }          
  }
  </code></pre>