grach

2016_August_28 Dailly Profit

Sep 3rd, 2017
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.79 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace DaillyProfit
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             var workDays = int.Parse(Console.ReadLine());
  14.             var dailySalary = double.Parse(Console.ReadLine());
  15.             var usdRate = double.Parse(Console.ReadLine());
  16.  
  17.             var totalMontlySalary = workDays * dailySalary;
  18.             var yearIncome = totalMontlySalary * 12 + totalMontlySalary * 2.5;
  19.             var afterTax = yearIncome * 0.25;
  20.  
  21.             var totalYearIncome = (yearIncome-afterTax) * usdRate;
  22.             var daylyAverage = totalYearIncome / 365;
  23.  
  24.             Console.WriteLine("{0:f2}",daylyAverage);      
  25.         }
  26.     }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment