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