Greg,

looks like your program works as designed.

If you leave the inputs floating they will be read HIGH, so your loop doesn't do anything else than looping.