Advertisement
SIRAKOV4444

Untitled

Mar 27th, 2019
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.98 KB | None | 0 0
  1.  
  2.  
  3. import java.util.Scanner;
  4.  
  5. public class Exe2 {
  6. public static void main(String[] args) {
  7. Scanner scanner = new Scanner(System.in);
  8.  
  9.  
  10. double income=Double.parseDouble(scanner.nextLine()); //dohod v leva
  11. double grade=Double.parseDouble(scanner.nextLine()); //sreden uspeh
  12. double minimumWage=Double.parseDouble(scanner.nextLine()); //minimalna zaplata
  13.  
  14. double money=0.0;
  15.  
  16.  
  17. if(minimumWage<income || grade>4.5) { //do tuk dobre
  18. money = 0.35 * minimumWage;
  19. System.out.println("You get a Social scholarship " + Math.floor(money) + " BGN");
  20. }else if(grade>=5.5) {
  21. money = 1.25 * grade;
  22. System.out.println("You get a scholarship for excellent results"+Math.floor(money)+"BGN");
  23. }else{
  24. System.out.println("You cannot get a scholarship!");
  25.  
  26.  
  27. }
  28. }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement