Advertisement
Guest User

Untitled

a guest
Feb 17th, 2020
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1. import java.beans.XMLEncoder;
  2. import java.util.Scanner;
  3.  
  4. public class Osigurovki
  5. {
  6. public static void main(String[] args)
  7. {
  8. Scanner in = new Scanner(System.in);
  9. int age = in.nextInt();
  10. double money = in.nextDouble();
  11. double moneyP; // osigurovki potrebitel
  12. double moneyR; // osigurovki rabotodatel
  13.  
  14. if (age ==0) {
  15. System.out.println("bebetata ne rabotqt");
  16. }
  17.  
  18. if (money<3000)
  19. {
  20. if(age<=55)
  21. {
  22. moneyP = money*0.20;
  23. moneyR = money*0.17;
  24. }
  25. else if (age>55 && age<=60) {
  26. moneyP = money*0.13;
  27. moneyR = moneyP;
  28. }
  29. else if (age>60 && age<=65)
  30. {
  31. moneyP = money*0.075;
  32. moneyR = money*0.9;
  33. }
  34. else {
  35. moneyP = money*0.5;
  36. moneyR = money*0.075;
  37. }
  38. }
  39. else {
  40. double newMoney = money - 3000; // ostanali parichki
  41. moneyP = 3000*0.20;
  42. moneyR = moneyP;
  43. }
  44. System.out.println(moneyP + " " + moneyR);
  45. }
  46. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement