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

If the nesting gets too tough, it might be time to consider "re-factoring" your program:

Thanks+; this is an excellent control structure which uses functions, and it has removed all the clumsy codes of my original program. I have taken it as an exercise, and I will report outcome once available.