Advertisement
Guest User

Икономика ДР

a guest
Apr 18th, 2019
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.36 KB | None | 0 0
  1. import java.util.*;
  2. import java.util.regex.Matcher;
  3. import java.util.regex.Pattern;
  4. import java.util.stream.Collectors;
  5.  
  6. public class Test {
  7. public static void main(String[] args) {
  8. Scanner scanner = new Scanner(System.in);
  9.  
  10. double wage = Double.parseDouble(scanner.nextLine());
  11. int year = Integer.parseInt(scanner.nextLine());
  12. int workYears = Integer.parseInt(scanner.nextLine());
  13. double reward = wage * Double.parseDouble(scanner.nextLine()) / 100;
  14. double ticket = Double.parseDouble(scanner.nextLine());
  15. double classWorkYears = wage * (workYears * 0.6) / 100;
  16. double bruto = wage + reward + ticket + classWorkYears;
  17. double DOO = 0;
  18.  
  19. if (year < 1960) {
  20. DOO += bruto * (18.80 / 100);
  21. } else {
  22. DOO += bruto * (13.78 / 100);
  23. }
  24.  
  25. double tax = bruto - DOO;
  26. double DDFL = tax * 0.1;
  27.  
  28. double neto = bruto - (DOO + DDFL);
  29.  
  30. System.out.println(String.format("classWorkYears: %.2f", classWorkYears));
  31. System.out.println(String.format("bruto: %.2f", bruto));
  32. System.out.println(String.format("DOO: %.2f", DOO));
  33. System.out.println(String.format("tax: %.2f", tax));
  34. System.out.println(String.format("DDFL: %.2f", DDFL));
  35. System.out.printf("neto: %.2f\n", neto);
  36.  
  37.  
  38.  
  39. }
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement