Question
PLEASE READ THE INSTRUCTIONS! Objective: Write a program that performs the following tasks: 1. Generate some number of random numbers, perhaps 30 or 40-ish, or
PLEASE READ THE INSTRUCTIONS!
Objective: Write a program that performs the following tasks: 1. Generate some number of random numbers, perhaps 30 or 40-ish, or more. Ask the user how many numbers to generate, though. Then ask the user how large the random numbers should be, but dont accept a number larger than 20. (That will help ensure that there are multiple numbers of the same value generated by the random number generator. If you dont see multiples of several numbers, restart the program and either use more numbers or a smaller spread of random numbers.) 2. As you generate the random numbers, store them all in a fresh, new, empty vector. Lets say this vector is called vec1. 3. Next, show the vectors contents, size, and capacity. (The vector will be unsorted.) 4. Make a copy of your vector, simply (not by manually copying it element by element). Lets say you name the second vector something like vec2 or vecCopy, (Feel free to use more creative names.) 5. Sort the numbers within the first vector you created using the sort algorithm in
1. The main function can be at either the beginning or the end of the program. I dont care which. 2. Add comments at the top of your main.cpp file to include your name, the name of the program, and notes on how your design works when executed. Point out any special features or techniques you added using a comment saying // Special Features. Keep a //changelog and a //notes section. 3. Comment your code effectively, as we discussed in class. Use descriptive variable names everywhere so that the code becomes as self-documenting as possible. Use additional commentary to improve readability and comprehensibility by other people.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started