It's a bit confusing as to what is what.
grade should probably be an int. You're using it as an int everywhere else.
Also, what if the input were all 100's, then you wouldn't have any...
Type: Posts; User: javapenguin
It's a bit confusing as to what is what.
grade should probably be an int. You're using it as an int everywhere else.
Also, what if the input were all 100's, then you wouldn't have any...
Is grade meant to be entered as a double, i.e. a decimal, or as an integer?
double grade=1;
grade = scan.nextInt();
if it's a double, then a better way of putting that would be
grade =...
while (grade<=100 && grade > 0)
This won't work if grade is 0 exactly.
while (grade<=100 && grade >= 0)
is better.
This probably isn't going to be code that you can use directly,...