Advertisement
Guest User

Untitled

a guest
Sep 15th, 2019
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.97 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class NewJavaClass {
  4.  
  5. public static void main(String[] args) {
  6. Scanner in = new Scanner(System.in);
  7.  
  8. double income = Double.parseDouble(in.nextLine());
  9. double averageScore = Double.parseDouble(in.nextLine());
  10. double minimalSalary = Double.parseDouble(in.nextLine());
  11.  
  12.  
  13. double socialScholarsShip = (35.0 * minimalSalary) / 100;
  14. double exellenceScholarsShip = (25.0 * averageScore);
  15.  
  16. if (averageScore > 4.50 && income < minimalSalary && socialScholarsShip > exellenceScholarsShip) {
  17. System.out.printf("You get a Social scholarship %.0f BGN", socialScholarsShip);
  18. } else if (averageScore >= 5.5 && exellenceScholarsShip >= socialScholarsShip) {
  19. System.out.printf("You get a scholarship for excellent results %.0f BGN", exellenceScholarsShip);
  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