08. Scholarship
Здравевйте,
По-долу е кода на задачата за стипендиите, но един от тестовете в judge не минава. Някой има ли идея къде може да е проблема?
Поздрави!
Стоян
import java.util.Scanner; public class Scholarship { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); double incomeBGN = Double.parseDouble(scanner.nextLine()); double avGrade = Double.parseDouble(scanner.nextLine()); double minSalary = Double.parseDouble(scanner.nextLine()); double socScholarship = 0; double scholarship = 0; if (avGrade <= 4.50) { System.out.println("You cannot get a scholarship!"); } else if (avGrade < 5.50) { if (incomeBGN < minSalary) { socScholarship = Math.floor(0.35 * minSalary); System.out.printf("You get a Social scholarship %.0f BGN", socScholarship); } else { System.out.println("You cannot get a scholarship!"); } } else { scholarship = Math.floor(avGrade * 25); socScholarship = Math.floor(0.35 * minSalary); if (socScholarship > scholarship) { System.out.printf("You get a Social scholarship %.0f BGN", socScholarship); } else { System.out.printf("You get a scholarship for excellent results %.0f BGN", scholarship); } } } }
Много благодаря!
Our academic pursuits, along with a range of extracurricular activities, help in honing a child's skills and ensuring that he/she grows to be a mature and responsible citizen.
best cbse school in greater noida
We offer end-to-end technical consultancy and know-how as well as know-why to broad spectrum of different requirements of the broadcasting industry.
apple reseller in delhi
mobile news gathering
mac pro service center in guwahati
MacBook pro reseller in kolkata
ipad reseller in bhubaneswar
MacBook air reseller in guwahati