Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace Passwords
- {
- class Program
- {
- static void Main(string[] args)
- {
- double startingMoney = double.Parse(Console.ReadLine());
- double bitcoinPrice = double.Parse(Console.ReadLine());
- int satoshi = int.Parse(Console.ReadLine());
- double boughtBitcoin = startingMoney / bitcoinPrice;
- double tax = boughtBitcoin * (satoshi * 1024) / 100000000;
- boughtBitcoin -= tax;
- double myProfit = boughtBitcoin * 0.1;
- double stephansMoney = boughtBitcoin - myProfit;
- Console.WriteLine($"Total bitcoin after expenses: {stephansMoney:f5} BTC");
- Console.WriteLine($"Tax payed: {(tax * bitcoinPrice):f2} USD");
- Console.WriteLine($"Programmer`s payment: {myProfit:f5} BTC");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement