Argentina Challenge help | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
0

Argentina Challenge help

This is the code I have. It's embarrassing I'm this far along and can't tell what's wrong here lol. It gets pesos but not dollars. I also tried double and parsing floats. decimal dollar=Convert.ToDecimal(Console.ReadLine()); decimal peso=Convert.ToDecimal(Console.ReadLine()); decimal conversion = peso * 0.02m; if(conversion<dollar){ Console.WriteLine("Pesos"); } else if(dollar<conversion){ Console.WriteLine("Dollars");} } }

21st Jan 2024, 8:19 PM
Breanna Thompson
Breanna Thompson - avatar
3 ответов
+ 3
I think it says that the first input is pesos and the second one dollars.
21st Jan 2024, 8:26 PM
Lisa
Lisa - avatar
+ 1
WOW. Thanks, Lisa, that worked. Literally just switched the inputs around lmao!
21st Jan 2024, 8:32 PM
Breanna Thompson
Breanna Thompson - avatar
+ 1
Great!
21st Jan 2024, 8:45 PM
Lisa
Lisa - avatar