Learning about Conditionals and Logic, throwing in a while loop broke the internet

So here’s the code I’ve written:

And for some reason, when clicking ‘Run’ on the text editor, it gets in this infinite loading loop, and when I try to go over to the terminal side of things to compile it, it says there’s not enough allocated memory.

I know that this is because I threw in a while loop of my own volition (I knew like 4 things coding-wise before coming here and that’s one of them xD) but I was curious why that was the case. Because I ran it in my own terminal/compiler on my Mac and it worked out exactly like I wanted it to, if you put in a number other than 1-5 for planet, it’ll keep asking you to put in a proper number, but when I click ‘Run’ on the website, it all freezes up and I have to refresh the page.

This code runs fine for me on my compiler.

Maybe return 0 at the end of the main()?

Nah it didn’t work. I’m in the lesson portion and haven’t been introduced to while statements yet, but I know how to use them so I have been, but for some reason it breaks my terminal when I click ‘Run’

Here’s another program I wrote where the same thing happens:

Again, if I run this on my machine in nano, it works just fine. But not on the website’s terminal for some reason

That could be because the terminal in CC isn’t responsive (I’m not sure if that’s the correct word), meaning it can’t accept input. That will cause the program to run until it times out.