Question: Using the C++ language to write the following. Write a function called getNums which first asks the user how many floating point numbers the user
Using the C++ language to write the following.
Write a function called "getNums" which first asks the user how many floating point numbers the user intends to enter. It then allocates an array to hold the numbers (only the number of entries needed) using the "new" keyword and finally, prompts for these numbers and loads them into the dynamically allocated array.
Show the code necessary to deallocate the space allocated in the function "getNums" above.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
