Just so you know, I think the problem was this line:
while (endingInteger >= 1)
'endingInteger' never changes, so if it enters the loop, it's always going to be greater than or equal to 1.
You do have a 'break' statement at one point, but it's nested in yet another loop, so it will only...