I can't figure out what I am missing, I think I need a break somewhere inside the for loops but I don't know exactly where I would put it, because once it gets to the first for loop it just keep looping and won't continue past it.
import java.util.Scanner; public class ********CalculateGrades { public static void main(String[] args) { Scanner sc = new Scanner(System.in); final int Assignments = 6; final int Tests = 2; double AssignmentAvg; double TestAvg; int Final; int Lab; double Avg; int[] AGrade = new int[Assignments]; int[] TGrade = new int[Tests]; System.out.println("Would you like to calculate your grades now?(y/n)"); String Input = sc.nextLine(); while(Input.equals("y") || Input.equals("Y")) { System.out.println("Enter your" + Assignments + " assignment grades."); for(int index = 0; index < Assignments; index++) { System.out.print("Assignment #" + (index + 1) + ": "); AGrade[index] = sc.nextInt(); double lowest = AGrade[0]; if(AGrade[index] < lowest) { lowest = AGrade[index]; } AssignmentAvg = (AGrade[index] - lowest) / Assignments; } System.out.println("Enter your" + Tests + " test grades."); for(int index = 0; index < Tests; index++) { System.out.print("Test #" + (index + 1) + ": "); TGrade[index] = sc.nextInt(); TestAvg = TGrade[index] / Tests; } System.out.println("Enter your lab grade"); Lab = sc.nextInt(); System.out.println("Enter your final grade"); Final = sc.nextInt(); Avg = (AssignmentAvg * .25) + (TestAvg * .30) + (Lab * .25) + (Final * .20); if(Avg >= 90) { System.out.println("Your grade is an A, and your average is " + Avg + "."); }else if(Avg >= 80) { System.out.println("Your grade is a B, and your average is " + Avg + "."); }else if(Avg >= 70) { System.out.println("Your grade is a C, and your average is " + Avg + "."); }else if(Avg >= 60) { System.out.println("Your grade is a D, and your average is " + Avg + "."); }else if(Avg < 60) { System.out.println("Your grade is an F, and your average is " + Avg + "."); } System.out.println("Do you want to calculate the grade of another student?"); Input = sc.nextLine(); } System.out.println("Thank you for using my Average Calculator, Bye bye!!"); } }