Hi Sweety,
I guess You have a problem with random number generation.might be your program is not able to generate the random numbers.
#include "stdafx.h"
#include <iostream>
#include <cstdlib>
#include <time.h>
using namespace std;
int main()
{
int i, r;
srand(time(0));
for(i = 0; i <= 2000; i++)
{
r = rand();
cout << "Number is " << r << ". It was generated on try number " << i << ".\n";
}
return 0;
}
please check the sample code above for random number generation... hope it can help you..