0

I don't get it

I'm running a C++ code in this app and in another C++ compiler app, it's the exact same code but the outputs I get in this app are wrong so I can't solve the "ballpark orders" problem. The outputs I get in another compiler are the right things that this app expects my code to output. But it's not working in this app. What can be the problem? Edit: here goes the code, it's the "Ballpark Orders" solution: https://sololearn.com/compiler-playground/cjlkIaEDb2ri/?ref=app Ballpark Orders problem https://www.sololearn.com/coach/15?ref=app

6th Jun 2024, 8:33 AM
Ray
Ray - avatar
4 ответов
+ 4
The task instruction says that the input is ONE string separated by blank space.
6th Jun 2024, 9:06 AM
Lisa
Lisa - avatar
+ 3
Without seeing your code, we can't help you so well. Maybe search the forum and the code playground first, see if someone has asked the same or similar question and the hint or answer you need is there. If that doesn't solve it, share your code, here's some info: https://sololearn.com/compiler-playground/Wek0V1MyIR2r/?ref=app https://sololearn.com/compiler-playground/WZ8lkR6gTex6/?ref=app https://sololearn.com/compiler-playground/W0uW3Wks8UBk/?ref=app
6th Jun 2024, 8:37 AM
Ausgrindtube
Ausgrindtube - avatar
+ 3
Ray you merely forgot to give sum an initial value of 0. Do that and then the code will pass.
6th Jun 2024, 5:25 PM
Brian
Brian - avatar
+ 1
The problem is that we can't see your code. Show your code so we can check on it.
6th Jun 2024, 8:35 AM
Lisa
Lisa - avatar