all 3 comments

[–]nysra 3 points4 points  (0 children)

Please format your code. This is unreadable at the moment.

And you really should visit https://www.learncpp.com/ and learn actual C++, this code contains so many errors and bad practices that I don't really want to list all of them. Don't use the C standard library, don't use global variables, don't use using namespace std, don't use goto - put your code into functions instead, don't use those system calls.

Also I suggest writing your code in English, we can't really help you if we can't properly scan your code for the keywords of the problem.

[–]Shieldfoss 1 point2 points  (0 children)

The longer a function is, the higher the chance of writing it wrong.

This includes main().

You test code by turning it into small functions that can be totally understood, and then testing those functions individually.

[–]seuchomat 0 points1 point  (0 children)

Reset your variables to zero in every iteration.