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 BGdolar
- {
- class Program
- {
- static void Main(string[] args)
- {
- double num = double.Parse(Console.ReadLine());
- string Currency1 = Console.ReadLine();
- string Currency2 = Console.ReadLine();
- double valuta1 = 0.0;
- double valuta2 = 0.0;
- if (Currency1 == "BGN")
- {
- valuta1 = 1;
- }
- else if (Currency1 == "USD")
- {
- valuta1 = 1.79549;
- }
- else if (Currency1 == "EUR")
- {
- valuta1 = 1.95583;
- }
- else if (Currency1 == "GBP")
- {
- valuta1 = 2.53405;
- }
- if (Currency2 == "BGN")
- {
- valuta2 = 1;
- }
- else if (Currency2 == "USD")
- {
- valuta2 = 1.79549;
- }
- else if (Currency2 == "EUR")
- {
- valuta2 = 1.95583;
- }
- else if (Currency2 == "GBP")
- {
- valuta2 = 2.53405;
- }
- double result = num * (valuta1 / valuta2);
- Console.WriteLine(Math.Round(result, 2));
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment