Advertisement
Guest User

Първа

a guest
Dec 17th, 2017
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.95 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 Passwords
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. double startingMoney = double.Parse(Console.ReadLine());
  14. double bitcoinPrice = double.Parse(Console.ReadLine());
  15. int satoshi = int.Parse(Console.ReadLine());
  16. double boughtBitcoin = startingMoney / bitcoinPrice;
  17. double tax = boughtBitcoin * (satoshi * 1024) / 100000000;
  18. boughtBitcoin -= tax;
  19. double myProfit = boughtBitcoin * 0.1;
  20. double stephansMoney = boughtBitcoin - myProfit;
  21. Console.WriteLine($"Total bitcoin after expenses: {stephansMoney:f5} BTC");
  22. Console.WriteLine($"Tax payed: {(tax * bitcoinPrice):f2} USD");
  23. Console.WriteLine($"Programmer`s payment: {myProfit:f5} BTC");
  24. }
  25. }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement