+ 1
My program is showing all the outputs correct but yet Solo Learn is showing it as Incorrect. Can anyone explain?
I made a raw program of "Military Time" and i know it's too bad to show but surprisingly it's producing correct output. But Solo Learn app is showing it incorrect. https://code.sololearn.com/cC6LdvyBxFWc/?ref=app
4 ответов
+ 2
Regarding the seemingly correct output: Whenever your solutions appear correct but are not approved, it is usually because you print characters without a console representation somewhere.
For example, in your program both paths lead to the string containing a null character, which is not visible on the console, but nonetheless in the output buffer. As a consequence, the string comparison between the given solution and your own will fail due to that extra character in the buffer.
+ 4
I made a code for you:
https://code.sololearn.com/cvuClLi8Z3ph/?ref=app
hope it helps :)
+ 1
Thanks for the help buddy Galaxy-Coding. But could you just explain what is actually happening with the program I made I mean it's showing the correct output, right?
What's the problem, then?
+ 1
Thanks for the information Shadow. 🤝
By the way, few hours back, I figured out the solution. I just displayed the string using using a loop and it worked.