If you use rand() it is possible that you could have the same number appear more then once in your array. In that case looping through the array will only detect the first occurance of that number in the array.
If you use rand() it is possible that you could have the same number appear more then once in your array. In that case looping through the array will only detect the first occurance of that number in the array.
"Knowledge is proud that she knows so much; Wisdom is humble that she knows no more."
-- Cowper
Operating Systems=Slackware Linux 9.1,Windows 98/Xp
Compilers=gcc 3.2.3, Visual C++ 6.0, DevC++(Mingw)
You may teach a person from now until doom's day, but that person will only know what he learns himself.
Now I know what doesn't work.
A problem is understood by solving it, not by pondering it.
For a bit of humor check out xkcd web comic http://xkcd.com/235/