Кристиан обнови решението на 11.10.2015 12:31 (преди около 9 години)
+@@currency_prices = { usd: 1.7408, eur: 1.9557, gbp: 2.6415, bgn: 1 }
+
+
+def convert_to_bgn(price, currency)
+ (price * @@currency_prices[currency]).round(2)
+end
+
+def compare_prices(first_price, first_currency,
+ second_price, second_currency)
+ convert_to_bgn(first_price, first_currency) -
+ convert_to_bgn(second_price, second_currency)
+end