Боян обнови решението на 07.10.2015 23:56 (преди около 9 години)
+def convert_to_bgn(price, currency)
+ currencies = {:usd => 1.7408, :eur => 1.9557, :gbp => 2.6415}
+ price = price * currencies[currency]
+end
+
+def compare_prices(price_one, cash_one, price_two, cash_two)
+ convert_to_bgn(price_one, cash_one) <=> convert_to_bgn(price_two, cash_two)
+end