public class TestReturnGradeMethod {
  public static void main(String[] args) {
    System.out.print("Ocena to: " + getGrade(78.5));
    System.out.print("\nOcena to: " + getGrade(59.5));
  }

  public static char getGrade(double score) {
    if (score >= 90.0)
      return '5';
    else if (score >= 80.0)
      return '4';
    else if (score >= 70.0)
      return '3';
    else if (score >= 60.0)
      return '2';
    else
      return '1';
  }
}
