Answer the question
In order to leave comments, you need to log in
Why expected 66 and get 65?
A method that outputs yearly estimates. But when testing, for some reason an error occurs, for example, Expected 66 but was 65? Help me please.
public class GrassHopper {
public static char getGrade(int s1, int s2, int s3) {
int score = (s1 + s3 + s3) / 3;
if(score >= 90 && score <= 100)return 'A';
else if(score >= 80) return 'B';
else if(score >= 70) return 'C';
else if(score >= 60) return 'D';
return 'F';
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question