title: Scanner only reads for loop once? - Java
body: <p>I'm trying to make a class where you input any number of grades (A-F) and calculates the GPA and returns the GPA and eligibility to extracurricular activities. It seems like the scanner only allows one input, then prints the GPA and eligibility. 
  So far this is what I have:  </p>
  
  <pre><code>import java.util.Scanner;
  
  public class Grades
  {
      public static void main(String[] args)
      {
          double myGPA;
          int myNumClasses;
          double myValue;
  
          Scanner sc = new Scanner(System.in);
  
          System.out.println("Press any other lettter to calculate.");
          System.out.print("Enter grades: ");
          String input = sc.nextLine();
  
          myValue = 0;
          myNumClasses = 0;
          myGPA = 0;
  
          for (String next = sc.next(); input.equalsIgnoreCase("a") ||     input.equalsIgnoreCase("b") || 
          input.equalsIgnoreCase("c")|| input.equalsIgnoreCase("d") || input.equalsIgnoreCase("f"); next = sc.next())
          {
              if (input.equalsIgnoreCase("a"))
              {
                  myValue += 4.0;
                  myNumClasses += 1;
              }
  
              else if (input.equalsIgnoreCase("b"))
              {
                  myValue += 3.0;
                  myNumClasses += 1;
              }
  
              else if (input.equalsIgnoreCase("c"))
              {
                  myValue += 2.0;
                  myNumClasses += 1;
              }
  
              else if (input.equalsIgnoreCase("d"))
              {
                  myValue += 1.0;
                  myNumClasses += 1;
              }
  
              else if (input.equalsIgnoreCase("f"))
              {   
                 myNumClasses += 1;
              }
  
              myGPA = myValue / myNumClasses;
  
              if (myGPA &gt;= 2.0 &amp;&amp; myNumClasses &gt;= 4)
              {
                  System.out.println("Eligible");
              }
              else if (myNumClasses &lt; 4)
              {
                  System.out.println("Ineligible, taking less than 4 classes");
              }
              else if (myGPA &gt;= 2.0 &amp;&amp; input.equalsIgnoreCase("f"))
              {
                  System.out.println("Ineligible, gpa above 2.0 but has F grade");
              }
              else if (myGPA &lt;= 2.0 &amp;&amp; input.equalsIgnoreCase("f"))
              {
                  System.out.println("Ineligible, gpa below 2.0 and has F grade");
              }
              else if (myGPA &lt; 2.0)
              {
                  System.out.println("Inelligible, gpa below 2.0");
              }
              System.out.println("Your GPA = " + myGPA);
           }
        }
  }
  </code></pre>