Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class scolarship {
- public static void main(String[] args) {
- Scanner scan = new Scanner(System.in);
- double money = Double.parseDouble(scan.nextLine());
- double schoolResults = Double.parseDouble(scan.nextLine());
- double minimalSalary = Double.parseDouble(scan.nextLine());
- double socialExtraMoney = minimalSalary * 0.35;
- double perfectResultsInSchool = schoolResults * 25;
- if (schoolResults >= 5.50 & perfectResultsInSchool > socialExtraMoney){
- System.out.printf("You get a scholarship for excellent results %.0f BGN", Math.floor(perfectResultsInSchool));
- } else if (money < minimalSalary & schoolResults > 4.50){
- System.out.printf("You get a Social scholarship %.0f BGN", Math.floor(socialExtraMoney));
- } else{
- System.out.println("You cannot get a scholarship!");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement