Nadradený pojem:
Answer 1: Think about the code you have written. Why might it fail to produce the right result? Modify code as needed.
Answer 2: Debug it. Visual Studio is a powerful IDE with professional debugging tools.