Question
C++ - attach file contains a long list of random numbers (Random.txt). 1. Copy the file to your hard drive. 2. Then write a program
C++ -
attach 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
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