Advertisement
Guest User

Untitled

a guest
Sep 24th, 2017
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.54 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class e02_Scholarship {
  4. public static void main(String[] args) {
  5. Scanner scanner = new Scanner(System.in);
  6.  
  7. double dohodLv = Double.parseDouble(scanner.nextLine());
  8. double sredenUspeh = Double.parseDouble(scanner.nextLine());
  9. double SMIC = Double.parseDouble(scanner.nextLine());
  10.  
  11. double stipendia = SMIC * 0.35;
  12. double stipendiaOtlichnici = sredenUspeh * 25;
  13.  
  14. if(dohodLv > SMIC && sredenUspeh < 5.50) {
  15. System.out.println("You cannot get a scholarship!");
  16. }
  17.  
  18. else if(dohodLv < SMIC && sredenUspeh < 4.50) {
  19. System.out.println("You cannot get a scholarship!");
  20. }
  21.  
  22. else if(dohodLv < SMIC && sredenUspeh >= 4.50 && sredenUspeh < 5.50 && stipendia > stipendiaOtlichnici) {
  23. System.out.printf("You get a Social scholarship %.0f BGN", stipendia);
  24. }
  25. else if(dohodLv < SMIC && sredenUspeh >= 4.50 && sredenUspeh < 5.50 && stipendia < stipendiaOtlichnici) {
  26. System.out.printf("You get a Social scholarship %.0f BGN", stipendia);
  27. }
  28.  
  29. else if(sredenUspeh >= 5.50 && stipendiaOtlichnici >= stipendia) {
  30. System.out.printf("You get a scholarship for excellent results %.0f BGN", stipendiaOtlichnici);
  31. }
  32.  
  33. else if(dohodLv < SMIC && sredenUspeh >= 5.50 && stipendiaOtlichnici >= stipendia) {
  34. System.out.printf("You get a scholarship for excellent results %.0f BGN", stipendiaOtlichnici);
  35. }
  36.  
  37. }
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement