If your tutor or assignment advises to use a for loop you may want something like this:
Scanner input = new Scanner (System.in);
int count, n, sum = 0;
//count is number of...
Type: Posts; User: djl1990
If your tutor or assignment advises to use a for loop you may want something like this:
Scanner input = new Scanner (System.in);
int count, n, sum = 0;
//count is number of...
Ah right, for some reason i thought he wanted to type in 3 grades.
I dont see the need for a loop in this.
A much simpler way would be this:
int grade1, grade2, grade3;
System.out.println("Enter 3 grades to find average: ");
Scanner scan...