Added statements to report the number of marbles all thru the program using various language so I could see where it hung exactly:
while (numMarbles > 1);
On that spurious semicolon.
After removing it, the program gets into an infinite loop with the number of marbles never changing... "The computers turn" over and over and over
Added: turn = 1-turn;
at the end of your while loop, so the player gets a turn (or the computer, depending how it started..) and it started reporting the computers turn then the players turn every other as it should. The game still isn't functioning properly, the computer takes away zero marbles, and when it got down to 5 marbles there was no valid move left to make for the player, but at least it's not hanging anymore... I'll leave the rest to you.
Finding them semicolons can be a real headache huh? :-)