Advertisement
Guest User

Scholaship_v2

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