public static void main(String[] args) {
int agrades = 0;
int fgrades=0;
int count=0;
Scanner input = new Scanner(System.in);
System.out.println("Enter Grades: ");
int grades = input.nextInt();
while (grades>=0 && grades<=0){
if (grades>=90 && grades<=100)
        agrades++;
if  (grades>=0 && grades<=60)
        fgrades++;
count++;
grades = input.nextInt();
}
System.out.println("Amount of Grade: " + count);
System.out.println("Average Grade: " + (grades+grades/count));
System.out.println("Number of grades above 90: " + agrades);
System.out.println("Number of grades below 60: " + fgrades);
}
}

#Exception in thread "main" java.lang.ArithmeticException: / by zero
at javaapplication12.JavaApplication12.mainsnippets/run.xml:53: Java     returned: 1
BUILD FAILED (total time: 3 seconds)

Your while test is wrong... while grades<= zero AND >= zero.
Grades can't be both those at the same time (unless it is == 0), so the test is false and the loop never gets executed.
Because the loop isn't executed you never increment count, so that stays at zero.
Then when you try to print the average you divide by count and thus get a zero divide exception!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.