Thats cause you are doing a
grade++; near the end of your loop. Try entering -2 and it should stop.
But I do not see any point in
grade++; being there since you are anyways going to overwrite it with
grade = input.nextDouble(); on the next iteration.
And please use code tags. Look
here and
here for more information on them. You should read the rules before posting.
Last edited by stephen84s; Sep 23rd, 2008 at 10:39 am.
Reputation Points: 653
Solved Threads: 151
Nearly a Posting Virtuoso
Offline 1,316 posts
since Jul 2007