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 ConsoleApplication2
- {
- class Program
- {
- static void Main(string[] args)
- {
- double volue = double.Parse(Console.ReadLine());
- string firstCurrensy = (Console.ReadLine());
- string secondCurrensy = (Console.ReadLine());
- double result = 0.0;
- double BGN = 1;
- double USD = 1.79549;
- double EUR = 1.95583;
- double GBP = 2.53405;
- if (firstCurrensy == "lv")
- {
- if (secondCurrensy == "$")
- {
- result = volue * (BGN / USD);
- }
- else if (secondCurrensy == "eu")
- {
- result = volue * (BGN / EUR);
- }
- else if (secondCurrensy == "pnd")
- {
- result = volue * (BGN / GBP);
- }
- }
- else if (firstCurrensy == "$")
- {
- if (secondCurrensy == "lv")
- {
- result = volue * (USD / BGN);
- }
- else if (secondCurrensy == "eu")
- {
- result = volue * (USD / EUR);
- }
- else if (secondCurrensy == "pnd")
- {
- result = volue * (USD / GBP);
- }
- }
- else if (firstCurrensy == "eu")
- {
- if (secondCurrensy == "lv")
- {
- result = volue * (EUR / BGN);
- }
- else if (secondCurrensy == "$")
- {
- result = volue * (EUR / USD);
- }
- else if (secondCurrensy == "pnd")
- {
- result = volue * (EUR / GBP);
- }
- }
- else if (firstCurrensy == "pnd")
- {
- if (secondCurrensy == "lv")
- {
- result = volue * (GBP / BGN);
- }
- else if (secondCurrensy == "$")
- {
- result = volue * (GBP / USD);
- }
- else if (secondCurrensy == "eu")
- {
- result = volue * (GBP / EUR);
- }
- }
- Console.WriteLine(result + " " + secondCurrensy);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement