0

Where should I post a question regarding code coach challenge in SoloLearn?

I'm getting the output in Code Playground but gets failed case in the code coach challenge! ? Why ?

21st Apr 2020, 3:43 PM
Ankith M Kashyap
Ankith M Kashyap - avatar
10 ответов
+ 1
Try to post in single reply... Description says.. 2cents equal to dollar so 2p:1d Peso*2/100 is equal to Dollar.. And your code not including when 2 equal value so write <= instead of <. Edit: The multiplication may result in overflow.. So use division..
21st Apr 2020, 4:23 PM
Jayakrishna 🇮🇳
+ 1
Where should I post a question regarding code coach challenge in SoloLearn? I'm getting the output in Code Playground but gets failed case in the code coach challenge! ? Why ?
22nd Apr 2020, 7:17 PM
Anil Thakur
Anil Thakur - avatar
0
Here, you can ask with your tried code which is giving you trouble with enough details.. Add link of your tried code..
21st Apr 2020, 3:47 PM
Jayakrishna 🇮🇳
0
Okay
21st Apr 2020, 3:53 PM
Ankith M Kashyap
Ankith M Kashyap - avatar
21st Apr 2020, 3:54 PM
Ankith M Kashyap
Ankith M Kashyap - avatar
0
It's on c and a try solution for Argentina easy
21st Apr 2020, 3:54 PM
Ankith M Kashyap
Ankith M Kashyap - avatar
0
#include <stdio.h> int main() { int priceIn_Peso; int priceIn_Dollars; int convertedValue; scanf("%d",&priceIn_Peso); scanf("%d", &priceIn_Dollars); convertedValue = priceIn_Peso / priceIn_Dollars* 2; if (convertedValue < priceIn_Dollars) { printf("Pesos"); } else if (convertedValue > priceIn_Dollars ) { printf("Dollars"); } return 0; }
21st Apr 2020, 3:55 PM
Ankith M Kashyap
Ankith M Kashyap - avatar
0
Finally it got solved thank you so much once again !! #include <stdio.h> int main() { int priceIn_Peso; int priceIn_Dollars; int convertedValue; scanf("%d",&priceIn_Peso); scanf("%d", &priceIn_Dollars); convertedValue = (priceIn_Peso * 2)/100; if (convertedValue <= priceIn_Dollars) { printf("Pesos"); } else if (convertedValue > priceIn_Dollars ) { printf("Dollars"); } return 0; }
22nd Apr 2020, 1:46 AM
Ankith M Kashyap
Ankith M Kashyap - avatar
0
You're welcome..
22nd Apr 2020, 10:16 AM
Jayakrishna 🇮🇳
0
Okay what was the code coach challenge?
23rd Apr 2020, 1:22 AM
Ankith M Kashyap
Ankith M Kashyap - avatar