Try and insert some debug printing before and after your drop while loop. And try to explain your idea behind the flow of the program execution. Also what is the expected behavior of your code when...