Question: In C++ please Your programming instructor expects you to write a program that outputs a user provided list of weights in numerical order. The instructor

In C++ please
Your programming instructor expects you to write a program that outputs a user provided list of weights in numerical order. The instructor informs you that you cannot user Vectors and reminds you that the user should be able to enter the total number of weights in the list before reading them in. Please answer the following questions. a) How do you store the list of weights? b) How would I allocate the space necessary to store the list (assume that the number of weights is stored in the variable n)? c) The program wants the values output in numerical order; which simple sort will you be using? d) Write a function called sortWeights that performs the indicated sort on the list of weights. e) What is the time complexity of this program?
PL Your programming instructor expects you to write a program that outputs a user provided list of weights in numerical order. The instructor informs you that you cannot user Vectors and reminds you that the user should be able to enter the total number of weights in the list before reading them in. Please answer the following questions. a) How do you store the list of weights? b) How would I allocate the space necessary to store the list (assume that the number of weights is stored in the variable n)? c) The program wants the values output in numerical order; which simple sort will you be using? d) Write a function called sortWeights that performs the indicated sort on the list of weights. e) What is the time complexity of this program
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
