Advertisement
Guest User

Untitled

a guest
Jun 26th, 2019
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.89 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.  
  7.         double income = Double.parseDouble(scanner.nextLine());
  8.         double averageGrade = Double.parseDouble(scanner.nextLine());
  9.         double minimalWorkingWage = Double.parseDouble(scanner.nextLine());
  10.  
  11.         double socialScholarship = minimalWorkingWage * 0.35;
  12.         double excellenceScholarship = averageGrade * 25;
  13.  
  14.         if (income < minimalWorkingWage && averageGrade > 4.5){
  15.             System.out.printf("You get a Social scholarship %.0f BGN", socialScholarship);
  16.         } else if (averageGrade >= 5.5){
  17.             System.out.printf("You get a scholarship for excellent results %.0f BGN", excellenceScholarship);
  18.         } else {
  19.             System.out.println("You cannot get a scholarship!");
  20.         }
  21.     }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement