Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a C++ program that prompts the user for the filename of an input data file that contains a list of double-precision numbers representing test

image text in transcribed

Write a C++ program that prompts the user for the filename of an input data file that contains a list of double-precision numbers representing test scores. The program should then prompt the user forthe number of test scores in the input data file. After the user enters the number of test scores in the input data file, the program must declare an array, named scores, which will hold the user-specified number of double- precision test scores. The program must then read the user-specified number of double-precision test scores from the input data file into the program "storing" each score in the array named scores. After all scores have been "stored" in the array, your program must invoke a function named sort which sorts the scores in the array into ascending order (low to high) you may use the selectionSort function given on pages 449 and 451 of the textbook. The program must then compute the sum and average of the scores. Finally, the program must prompt the user for the filename of an output data file. The program must open the user-specified output data file and then write the following data to the output data file The total number of scores which were processed. This will be the user-entered number that was used as the "size" of the array named scores. 1. 2. The sum of the scores which were processed 3. The average of the scores which were processed. 4. The list of scores in ascending numeric order. For each score in the list, place an asterisk ) in front of each score that is below the average Additionally each score should be followed by its letter grade equivalent using the following scale: Between 90 and 100 A Greater than or equal to 80 and less than 90 B Greater than or equal to 70 and less than 80 C Greater than or equal to 60 and less than 70-D Less than 60F

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

Next Generation Databases NoSQLand Big Data

Authors: Guy Harrison

1st Edition

1484213300, 978-1484213308

More Books

Students also viewed these Databases questions

Question

3. Design a program for preparing for cross-cultural assignments.

Answered: 1 week ago

Question

2. Develop a program for effectively managing diversity.

Answered: 1 week ago

Question

7. What is coaching? Is there only one type of coaching? Explain.

Answered: 1 week ago