[Solved] Loops in loops and increment staying at 0 in C++ [closed]


By the time p3 equals 10, it will never re-enter the while (p3 < 10) loop (because once you’ve incremented it to 10, it will never be less than 10 and will never re-enter that loop). So yes, p and p2 do increment, but they never get printed because p3 == 10 at that point in time.

solved Loops in loops and increment staying at 0 in C++ [closed]