Guest User

mitko

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