Guest User

Profit

a guest
Nov 4th, 2016
708
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.53 KB | None | 0 0
  1. using System;
  2.  
  3.  
  4. class Program
  5. {
  6.     static void Main(string[] args)
  7.     {
  8.         int days = int.Parse(Console.ReadLine());
  9.         double money = double.Parse(Console.ReadLine());
  10.         double rate = double.Parse(Console.ReadLine());
  11.  
  12.         double monthEarn = days * money;
  13.         double yearEarn = monthEarn * 12 + monthEarn * 2.5;
  14.         yearEarn *= 0.75;
  15.         double profitInLeva = yearEarn * rate;
  16.         double earnPerDay = profitInLeva / 365;
  17.  
  18.         Console.WriteLine("{0:F2}", earnPerDay);
  19.     }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment