Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class demo {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- int days = Integer.parseInt(scanner.nextLine());
- double dayPayment = Double.parseDouble(scanner.nextLine());
- double course = Double.parseDouble(scanner.nextLine());
- double monthSalary = dayPayment * days;
- double anualSalary = monthSalary * 12;
- double bonus = monthSalary * 2.5;
- double totalSalary = anualSalary + bonus;
- double tax = totalSalary * 0.25;
- double netSalaryUsd = totalSalary - tax;
- double netSalaryLv = netSalaryUsd * course;
- double result = netSalaryLv / 365;
- System.out.printf("%.2f", result);
- }
- }
Add Comment
Please, Sign In to add comment