+ 1

[Question] Argentina codecoach

Pls why is the following code wrong, got first 4 cases https://code.sololearn.com/c3GPQP27CUEU/?ref=app

30th Jul 2020, 4:19 PM
BRYAND CHE
BRYAND CHE - avatar
9 Réponses
+ 2
BRYAND CHE , variable d should be float or double type. Change also line 10 to => d = dollar * 50.0.
30th Jul 2020, 4:33 PM
TheWh¡teCat 🇧🇬
TheWh¡teCat 🇧🇬 - avatar
+ 2
BRYAND CHE , if you change the things I mentioned everything works.
30th Jul 2020, 4:49 PM
TheWh¡teCat 🇧🇬
TheWh¡teCat 🇧🇬 - avatar
+ 1
M. M. H. , your code works without errors, but this is a task from code coach and you should consider if it passes all test cases.
30th Jul 2020, 4:54 PM
TheWh¡teCat 🇧🇬
TheWh¡teCat 🇧🇬 - avatar
+ 1
Think logically to solve it.
31st Jul 2020, 3:06 PM
shubham kumar
shubham kumar - avatar
0
Hi i fixed it. you placed int main() and #include twise. Hope it helps. https://code.sololearn.com/coPG4DqIG9X0/?ref=app
30th Jul 2020, 4:33 PM
M. M. H.
M. M. H. - avatar
0
M. M. H. Thanks but nothing changed
30th Jul 2020, 4:44 PM
BRYAND CHE
BRYAND CHE - avatar
0
but it works for me. look at my code. I commented that part and it works
30th Jul 2020, 4:51 PM
M. M. H.
M. M. H. - avatar
0
TheWhiteCat thanks, your suggestion worked.
30th Jul 2020, 4:59 PM
BRYAND CHE
BRYAND CHE - avatar
0
Thanks to every other one here
30th Jul 2020, 5:00 PM
BRYAND CHE
BRYAND CHE - avatar