I write a simple average program, but for some reason I keep getting compiler error. I tried to check my work, but still can't find where do I do wrong. It shows the message on average = total/10, and it says something like unable to reach statement.
//test
import java.util.Scanner;
public class increment
{
public static void main(String[] args)
{
Scanner input = new Scanner(System.in);
int total=0;
int grade;
int average;
int counter=0;
while (0<10)
{
System.out.println("Please enter the nubmer: ");
grade = input.nextInt();
total = total + grade;
counter++;
}
average = total/10;
System.out.println("The average is "+ average);
}
}