i've made the final draft of the program its the same as the one posted in post #15
only i've changed the return type of main to int and added the statement
return 0;
at the end.

i feel that it has improved since i've started this thread.

Thanks, everyone who has helped!

And Happy New Year to all.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.