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 ConsoleApp17
- {
- class Program
- {
- static void Main(string[] args)
- {
- double sum = double.Parse(Console.ReadLine());
- string inputCurrency = Console.ReadLine();
- string outputCurrency = Console.ReadLine();
- if (inputCurrency == "USD" || inputCurrency =="usd") sum *= 1.79549;
- else if (inputCurrency == "EUR" || inputCurrency == "eur") sum *= 1.95583;
- else if (inputCurrency == "GBP" || inputCurrency == "gbp") sum *= 2.53405;
- if (outputCurrency == "USD" || outputCurrency == "usd") sum /= 1.79549;
- else if (outputCurrency == "EUR" || outputCurrency == "eur") sum /= 1.95583;
- else if (outputCurrency == "GBP" || outputCurrency == "gbp") sum /= 2.53405;
- Console.WriteLine("{0:F2} {1}",sum,outputCurrency);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement