grach

2016_July_17_2016 Money

Aug 15th, 2017
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.83 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 Money_BitCoin
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             var bitCoin = double.Parse(Console.ReadLine());
  14.             var chineYuan = double.Parse(Console.ReadLine());
  15.             var charge = double.Parse(Console.ReadLine())/100;
  16.  
  17.             double bitcoinRate = 1168*bitCoin;
  18.             double chineYuanRate = 0.15*chineYuan;
  19.             double USDRate = 1.76;
  20.             double EURRate = 1.95;
  21.  
  22.             var chargePercent = ((bitcoinRate+chineYuanRate*USDRate)/EURRate)*charge;
  23.             var result = (((bitcoinRate + chineYuanRate * USDRate) / EURRate)-chargePercent);
  24.  
  25.             Console.WriteLine("{0:f2}",result);
  26.         }
  27.     }
  28. }
Add Comment
Please, Sign In to add comment