Can goto() statements be avoided in this program -- pls place code?

people should not use goto() statement at all anymore so it's definitely possible to not use it.

why don't you use state machine for this concept. it is much easier to read and manage.