Any C++ solution? I am not understanding why is my solution getting wrong!!! -_-
created
last reply
- 2
replies
- 396
views
- 2
users
- 1
link
Any C++ solution? I am not understanding why is my solution getting wrong!!! -_-
This problem is unusual in SPOJ, in that it puts out a prompt as though it’s being run by an interactive user.
So, you also need to write the prompt, (with no new line), read the value, then either write an error message or display the information message and the triangle.
(Because this isn’t really an interactive program, and input and output are from/to separate files, you can actually read the input value before writing the prompt - it’s all the same in SPOJ land. But you do still need to write the prompt.)
If you’re still having trouble, post your code here and I’ll see if I can spot anything.
Topic | Category | Replies | Views | Activity |
---|---|---|---|---|
What’s wrong in my code, in the problem Euclids algorithm revisited | Online Judge System | 2 | 252 | Jun '24 |