Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a C + + program that will prompt user to enter an integer for a size of the array of test scores that will

Write a C++ program that will prompt user to enter an integer for a size of the
array of test scores that will be dynamically allocated at run time. This integer
can be any value from 6 to 10(keep it small as you will need to enter test scores
for this array).
The prompt user to enter all values for the test scores. A test score can only be
integer value ranging from 0 to 100. Do not accept any value less then 0 or greater
than 100. You must user pointer notation when access the array.
You may initially write this code in your main() function but this code for entering
data to the array must be done in a function. You may call this function
getData(). Remember that arrays are passed by reference so this function
should have a void return type.
You also need to write another function findAverage() that will accept the
array of scores and then calculate and return the average of all scores in the
array. This average value should be type double. Use pointer notation when
accessing the array.
Lastly, write another function called print()that will accept the array and size
of the array and then print each value of the array in one line with each value
separated by a blank character. You may use array notation in this function.
Also print the average with some description from the main function after calling
the print() function.

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_2

Step: 3

blur-text-image_3

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

Main Memory Database Systems

Authors: Frans Faerber, Alfons Kemper, Per-Åke Alfons

1st Edition

1680833243, 978-1680833249

More Books

Students also viewed these Databases questions

Question

How can causes be related to the basic functions of management?

Answered: 1 week ago

Question

What is the purpose of the Salary Structure Table?

Answered: 1 week ago

Question

What is the scope and use of a Job Family Table?

Answered: 1 week ago