Advertisement
Guest User

Untitled

a guest
Sep 18th, 2019
213
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.94 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class scolarship {
  4.     public static void main(String[] args) {
  5.  
  6.         Scanner scan = new Scanner(System.in);
  7.  
  8.  
  9.         double money = Double.parseDouble(scan.nextLine());
  10.         double schoolResults = Double.parseDouble(scan.nextLine());
  11.         double minimalSalary = Double.parseDouble(scan.nextLine());
  12.  
  13.         double socialExtraMoney = minimalSalary * 0.35;
  14.         double perfectResultsInSchool = schoolResults * 25;
  15.  
  16.         if (schoolResults >= 5.50 & perfectResultsInSchool > socialExtraMoney){
  17.             System.out.printf("You get a scholarship for excellent results %.0f BGN", Math.floor(perfectResultsInSchool));
  18.         } else if (money < minimalSalary & schoolResults > 4.50){
  19.             System.out.printf("You get a Social scholarship %.0f BGN", Math.floor(socialExtraMoney));
  20.         } else{
  21.             System.out.println("You cannot get a scholarship!");
  22.         }
  23.  
  24.  
  25.  
  26.     }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement