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 SimpleCalcs
- {
- class Program
- {
- static void Main(string[] args)
- {
- var input = double.Parse(Console.ReadLine());
- string CurrInput = Console.ReadLine();
- string CurrOutput = Console.ReadLine();
- if (CurrInput == "USD")
- {
- input = input * 1.79549;
- }
- else if (CurrInput == "EUR")
- {
- input = input * 1.95583;
- }
- else if (CurrInput == "GBP")
- {
- input = input * 2.53405;
- }
- else if (CurrInput == "BGN")
- {
- input = input * 1.0;
- }
- if (CurrOutput == "BGN")
- {
- input = input / 1.0;
- }
- else if (CurrOutput == "USD")
- {
- input = input / 1.79549;
- }
- else if (CurrOutput == "EUR")
- {
- input = input / 1.95583;
- }
- else if (CurrOutput == "GBP")
- {
- input = input / 2.53405;
- }
- Console.WriteLine(Math.Round(input,2) + " " + CurrOutput);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement