Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create a C++ code Write a C++ console program that prompts the user for what size of an array to create. Use dynamic memory allocation

Create a C++ code
image text in transcribed
Write a C++ console program that prompts the user for what size of an array to create. Use dynamic memory allocation to create an array of integers on the heap. Use a loop to gather numbers from the user and store them in the array. Use pointer notation to access the array. After the array has been filled, compute the average and the quantity of numbers that are above the average. Display the results in a pleasing format. Note: Do not use square bracket notation [ in this program, except for when using the new operator. Use only pointer notation to manipulate the array. Note: Whenever you use dynamically allocated memory, it is critical that you remember to de-allocate the memory so that it is returned back to the operating system. signment 21 How many integers do you want in the array? 5 hat is int 1: 1 hat is int 2: What is int 3: 2 hat is int 4:4 hat is int s3 Average of your ints: 3.00 Number of ints above average: 2 bove average ints are: lenent 1 is above average. It is: 5 lement 3 is above average. It is: 4 Press any key to continue

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Reliability Engineering Designing And Operating Resilient Database Systems

Authors: Laine Campbell, Charity Majors

1st Edition

978-1491925942

Students also viewed these Databases questions

Question

What are the organizations reputation goals on this issue?

Answered: 1 week ago

Question

What change do you need to make to achieve the desired position?

Answered: 1 week ago