Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

must be written in cpp. thank you. Write a program that reads a file consisting of students test soores in the range 0-200. It should

must be written in cpp. thank you.

image text in transcribed

Write a program that reads a file consisting of students test soores in the range 0-200. It should then determine the number of students having scores in each of the following ranges: 0-24, 25-49, 50-74, 75-99, 100- 124, 125-149, 150-174, and 175-200. Output the score ranges and the number of students. Run your program with the following input data: 76, 89, 150, 135, 200, 76, 12, 100, 150, 28, 178, 189, 167, 200, 175, 150, 87, 99, 129, 149, 176, 200, 87, 35, 157, 189.) - Noncompiling (-25) - No documentation (-5) - You nust use functions. No user-defined functions (-15) Examples of functions could include populating the scores aray, outputting the results, etc. - Must use a single array (buckets) (-4 if others) - Must use while loop to read in data from the file (-3 if not) Output must use a for loop (loop 8 times) and in the output, each line must contain the range of scores (0-24 Range, 25-49 range, etc.) (4 if not) In other words, no straight output of all results. Must loop - Inefficient code too many loops, too many ifs, etc. (up to -5, includes statement below) -Efficiency: Should use / andor % operator to determine the index of the appropriate bucket. No need to use an ifelse if statement to do so (-3) - Not passing parameters to functions appropriately (-3) - Incorrect Output isee sample in text) (-8) - Efficiency: Anything else extraneous or odd, up to (-5) and noted what it was

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 Design For Mere Mortals

Authors: Michael J Hernandez

4th Edition

978-0136788041

More Books

Students also viewed these Databases questions