why my code get stuck into the while loop. I am not able to understand why it\'s happening. This code is running as usual on online code checkers and compilers like