Advertisement
bilenlyatif

Untitled

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