title: Finding min and max of user input data C# (without Linq)
body: <p>I have a program that I am working on to practice for a midterm, it is a simple Gradebook program that allows the user to input as many grades from 0-100 as they want. I have various things that calculate at the end that work fine but I need the program to also display the lowest and the highest grades. I saw another post where someone talks about linq (?) I have not worked with this and haven't researched it yet. I figure if it isn't in the book I shouldn't need it yet. the code is long so I will try to only include what I think is necessary...</p>
  
  <pre><code>    using System;
  
      public class GradeBook
  {
  private int total;
  private int gradeCounter;
  private int aCount;
  private int bCount;
  private int cCount;
  private int dCount;
  private int fCount;
  
  // automatic popert CourseName
  public string CourseName { get; set; }
  </code></pre>
  
  <p>then in order to get the user input</p>
  
  <pre><code> public void InputGrades()
  {
      int grade; //grade made by user
      string input; //text entered by user
  
      Console.WriteLine("{0}\n{1}",
          "enter integer in the range of 0-100.",
          "Type &lt;ctrl&gt; Z and press endter to terminate input:");
  
      input = Console.ReadLine(); //user input
  
      //loop until user enters the end of file indicator
      while (input != null)
      {
          grade = Convert.ToInt32(input);
          total += grade; //create total to form sum
          ++gradeCounter;//increment the number of grades for average
  
          // call method to increment appropriate counter
          IncrementLetterGradeCounter(grade);
  
          input = Console.ReadLine();
      }//end while(input != null)
  </code></pre>
  
  <p>This is my first post to SO so if there is something I have done wrong please let me know. If more code is necessary let me know.</p>