Advertisement
Ivakis

Дневна печалба

Aug 8th, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class uprajnenie {
  4. public static void main(String[] args) {
  5. Scanner scanner = new Scanner(System.in);
  6.  
  7. int workDays = Integer.parseInt(scanner.nextLine());
  8. double moneyPerDay = Double.parseDouble(scanner.nextLine());
  9. double usdToBgn = Double.parseDouble(scanner.nextLine());
  10.  
  11. double monthSalary = workDays * moneyPerDay;
  12.  
  13. double annualSalary = monthSalary * 12 + monthSalary * 2.5;
  14.  
  15. double tax = annualSalary * 0.25;
  16.  
  17. double netIncome = annualSalary - tax;
  18.  
  19. double incomeLv = netIncome * usdToBgn;
  20.  
  21. double averageSalary = incomeLv / 365;
  22.  
  23. System.out.printf("%.2f", averageSalary);
  24. }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement