Question: C++ question. How to write this program? The attached file contains a long list of random numbers (Random.txt). 1. Copy the file to your hard

C++ question. How to write this program?

The attached file contains a long list of random numbers (Random.txt).

1. Copy the file to your hard drive.

2. Then write a program that asks user to enter the file name to open and validates that the file is successfully open.

3. Once the user opens the file (Random.txt) successfully, your program should calculate the following:(The output should be in the following format)

A) The number of numbers in the file:

B) The number of even numbers in the file:

C) The number of odd numbers in the file:

D) The sum of all the numbers in the file:

E) The average of all the numbers in the file:

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!