Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a C++ program that reads a list of double values from a file into an array of doubles. Ask the user to input the
Write a C++ program that reads a list of double values from a file into an array of doubles. Ask the user to input the filename, and output the following: All the numbers, five numbers per line formatted to two decimal places using a field width of ten. Your values must be neatly displayed. See sample below. The smallest value The largest value The count and sum of all the numbers Frequency analysis of the numbers You must implement the following functions: A function that reads the data from a file and finds the number of values read. void get_numbers (double numbers[], int & count); A function that prints the numbers void print_numbers (double numbers[], int count); A function that returns the smallest value double get_smallest (double numbers[], int count); A function that returns the largest value double get_largest (double numbers[], int count); A function that returns the sum of all the values double get_total (double numbers[], int count); A function that finds the following: The number of values between 0 and 100 The number of values between 100 and 500 The number of values greater than 500 A function to display the report Your main program should only contain variable declarations and function calls
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started