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 currency
- {
- class Program
- {
- static void Main(string[] args)
- {
- int bitcoins = int.Parse(Console.ReadLine());
- double juans = double.Parse(Console.ReadLine());
- double commissionPercent = double.Parse(Console.ReadLine());
- double bitcoinConversion = 1168;
- double chinaToUSD = 0.15; //usd
- double dollarConversion = 1.76; //lv
- double euroConversion = 1.95; //lv
- double bitcoinToLev = bitcoins * bitcoinConversion;
- double chnToDollar = juans * chinaToUSD;
- double dollarToLev = chnToDollar * dollarConversion; // *
- double totalNoCommission = bitcoinToLev + dollarToLev;
- double totalToEuro = totalNoCommission / euroConversion;
- double commission = totalToEuro * commissionPercent / 100; // commission isnt constant
- double finalresult2 = totalToEuro - commission;
- Console.WriteLine(finalresult2);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment