Joined
Last Seen
0 Reputation Points
100% Quality Score
- Upvotes Received
- 1
- Posts with Upvotes
- 1
- Upvoting Members
- 1
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
0 Endorsements
Ranked #107.67K
1 Posted Topic
You can try to write a main function and generate a random array. #include<iostream> #include<cstdlib> #include<ctime> #define N 50000 void createArray(int array[]) { srand((unsigned int)time(NULL)); for (int i = 0; i < len; i++) { int num = (int)((double)rand()/RAND_MAX*N);//N can be any maximum you want. array[i] = num; } }
The End.
yw_046