Ad
  • Custom User Avatar

    As I said above: your solution has a bug. The variable a is not initialized, and on the first loop run, the expression i < a is undefined. Use of unitialized variables is an undefined behavior (i.e. a bug).
    You need to fix the bug in your solution.

  • Custom User Avatar

    What language is this? If this is C++, then it is not correct. Use of an uninitialized variable is an error. Your Visual Studio should emit an appropriate warning?

    It's a bug in your solution, not a kata issue.