SHARE
TWEET

Untitled

a guest Jan 22nd, 2020 82 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import java.util.Scanner;
  2.  
  3. public class Scholarship {
  4.     public static void main(String[] args) {
  5.         Scanner scan = new Scanner(System.in);
  6.         double salary = Double.parseDouble(scan.nextLine());
  7.         double uspeh = Double.parseDouble(scan.nextLine());
  8.         double minSalary = Double.parseDouble(scan.nextLine());
  9.  
  10.         double socialScholarship = minSalary * 0.35;
  11.         double scholarship = uspeh * 25;
  12.  
  13.         if (uspeh >= 5.50 && salary < minSalary && socialScholarship >= scholarship) {
  14.             System.out.printf("You get a Social scholarship %.0f BGN", Math.floor(socialScholarship));
  15.         } else if (uspeh >= 5.50 && salary < minSalary && socialScholarship < scholarship) {
  16.             System.out.printf("You get a scholarship for excellent results %.0f BGN", Math.floor(scholarship));
  17.  
  18.         } else if (uspeh >= 4.50 && salary < minSalary) {
  19.             System.out.printf("You get a Social scholarship %.0f BGN", Math.floor(socialScholarship));
  20.         } else if (uspeh >= 5.50) {
  21.             System.out.printf("You get a scholarship for excellent results %.0f BGN", Math.floor(scholarship));
  22.         } else {
  23.             System.out.printf("You cannot get a scholarship!");
  24.         }
  25.     }
  26. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top