1) Never use goto . Use a while loop instead.
2) Format your code properly. It's difficult to follow and mistakes are made with bad formatting.
3) Always call srand() onceand only once, at the beginning of the program.
4) Never use system("cls"); while programming. It's hard to debug code and see what has happened when the screen clears. We recommend never using it because it's annoying to the user, but if you really need it, add it after the program is running -- not before.
5) Never use system("pause"); . Why call the operating system to pause a program when cin will do it, cin is part of the language, and it's portable.
WaltP
Posting Sage w/ dash of thyme
10,505 posts since May 2006
Reputation Points: 3,348
Solved Threads: 944