link to my code https://ide.codingblocks.com/s/245156
Your code is running in an infinite loop
you can see this