BubaLazi

p01_Profit

Mar 16th, 2017
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.72 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class Profit {
  4.     public static void main(String[] args) {
  5.         Scanner console = new Scanner(System.in);
  6.  
  7.         int workingDaysInMoth = Integer.parseInt(console.nextLine());
  8.         double dailyProfit = Double.parseDouble(console.nextLine());
  9.         double usdExcange = Double.parseDouble(console.nextLine());
  10.  
  11.  
  12.         double monthProfit = workingDaysInMoth * dailyProfit;
  13.         double yearProfit = monthProfit * 12 + monthProfit * 2.5;
  14.         double afterTaxes = yearProfit - ( yearProfit * 0.25);
  15.  
  16.         double profitInLeva = afterTaxes * usdExcange;
  17.  
  18.         double dailiProfitInLv = profitInLeva / 365;
  19.  
  20.         System.out.printf("%.2f", dailiProfitInLv);
  21.     }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment