0
Why is this program a mistake [4]
When challenging code coach (how far?), i can't satisfy the test condition 3 and 4. Can anyone give me advice how it's done? Btw here is my code so far: https://sololearn.com/compiler-playground/c4QgbDta5Uca/?ref=app
8 Antworten
+ 3
The first problem that happened is the missing } 😅
Easily fixed.
I tried 2 different inputs and you tell me what's wrong with your code.
Input 1: HBBP
Input 2: PBBH
+ 4
the challenge is from the `code coach` section:
https://www.sololearn.com/coach/72?ref=app
+ 3
What am i supposed to do in this challenge,
how am i supposed to help you if i don't know the challenge.
+ 2
You'll get it for sure.
Happy to help when I can.
Enjoy your coding journey!
+ 2
The } is missing
+ 1
I know the missing } was a mistake. All good there.
Have you tested and viewed my 2 inputs?
+ 1
Oh. The second input gives value -1 in my code. I think the culprit is the break function. thank a lot for helping me debug this code.
0
Ausgrindtube oh, about the missing ' }' its my mistake. What i mean in this post is the logical error in my program. Because in the code coach test run, the 3rd and 4th test is always give wrong result with my mentioned code. How should i do to make this right?