Infinte Loop

Program is getting stuck in an infinite loop. Cannot determine why.