Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.*;
- import java.util.regex.Matcher;
- import java.util.regex.Pattern;
- import java.util.stream.Collectors;
- public class Test {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- double wage = Double.parseDouble(scanner.nextLine());
- int year = Integer.parseInt(scanner.nextLine());
- int workYears = Integer.parseInt(scanner.nextLine());
- double reward = wage * Double.parseDouble(scanner.nextLine()) / 100;
- double ticket = Double.parseDouble(scanner.nextLine());
- double classWorkYears = wage * (workYears * 0.6) / 100;
- double bruto = wage + reward + ticket + classWorkYears;
- double DOO = 0;
- if (year < 1960) {
- DOO += bruto * (18.80 / 100);
- } else {
- DOO += bruto * (13.78 / 100);
- }
- double tax = bruto - DOO;
- double DDFL = tax * 0.1;
- double neto = bruto - (DOO + DDFL);
- System.out.println(String.format("classWorkYears: %.2f", classWorkYears));
- System.out.println(String.format("bruto: %.2f", bruto));
- System.out.println(String.format("DOO: %.2f", DOO));
- System.out.println(String.format("tax: %.2f", tax));
- System.out.println(String.format("DDFL: %.2f", DDFL));
- System.out.printf("neto: %.2f\n", neto);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement