0 LIKES LikeUnLike
cout<<"wining number is : "; srand(time(0)); for(i=0;i<=size-1; i ) { w[i] = 1 rand()B; cout<<"["<<w[i]<<"] "; } cout<<endl;this code stores a random number into an array then prints it out. but sometimes the number in the array repeats. i want to know how can i make the numbers not repeat itself or how to trap it...
Tags:
Report (0) (0) | earlier
Latest activity: earlier. This question has 4 answers.