DO-WHILE loop --- Waiting for pressing of either of 2 buttons

aarg:
I see that you have connected switches to pin 0 and 1, they are reserved for serial communications.

I changed the pins to 10 and 11, it solved the problems.

Thanks all of you, especially UKHeliBob for directing me some useful topics.