kyojustorm
2008-08-17 08:52:39 UTC
#include
#include
#include
using namespace std;
int random_integer;
int main()
{
srand((unsigned)time(0));
for(int index=0; index<20; index++)
{random_integer = (rand()%51)+1;
cout << random_integer << endl;}
system ("pause");
}
Thanks for the people that helped me in my previous
questions! I however, need a slight change in this code!
Can it be changed so that it'll generate 52 random, and
non-recurring numbers? That means that it does not
generate 2 same numbers.
Thanks for helping!