Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ Programming Question 2: Largest Smallest of File Write a program that generates a list of random numbers of type double and output to a

C++ Programming

image text in transcribed

Question 2: Largest Smallest of File Write a program that generates a list of random numbers of type double and output to a file named randoms.txt. Then opens the file random.txt, takes its input from the file of numbers of type double and outputs the largest and the smallest number found in the file to the screen. The program reads all the numbers from the file, and calculates the following: A) The number of numbers in the file B) The sum of all the numbers in the file (a running total) C) The average of all the numbers in the file The file contains nothing but numbers of type double separated by blanks and/or line breaks. You will need to create one or more test files in order to test your program The program should display the largest and smallest numbers. # of numbers found in the file, the sum of the numbers, and the average of the numbers. Set up the output formatting to two digits after the decimal point

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

Secrets Of Analytical Leaders Insights From Information Insiders

Authors: Wayne Eckerson

1st Edition

1935504347, 9781935504344

More Books

Students also viewed these Databases questions

Question

The two reporters (ran after) every lead enthusiastically.

Answered: 1 week ago