Задача Scholarship - Java
Здравейте, колеги!
Опитах да пререша задачата, но при Judge ми дава само 68% вярно. Можете ли да ми помогнете, защото не мога да си открия грешката.
import java.util.Scanner; public class ScholarShip { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); double income = Double.parseDouble(scanner.nextLine()); double avgGrade = Double.parseDouble(scanner.nextLine()); double minWage = Double.parseDouble(scanner.nextLine()); double social = 0.0; double excellent = 0.0; if (income < minWage && avgGrade > 4.5){ social = minWage * 0.35; } if (avgGrade >= 5.5){ excellent = avgGrade * 25; } if (social == 0.0 && excellent == 0.0){ System.out.println("You cannot get a scholarship!"); } else if (social > excellent){ System.out.printf("You get a Social scholarship %.0f BGN", Math.floor(social)); }else { System.out.printf("You get a scholarship for excellent result %.0f BGN", Math.floor(excellent)); } } }