Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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_2

Step: 3

blur-text-image_3

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

Oracle Database Administration The Essential Reference

Authors: Brian Laskey, David Kreines

1st Edition

1565925165, 978-1565925168

More Books

Students also viewed these Databases questions

Question

What is meant by formal organisation ?

Answered: 1 week ago

Question

What is meant by staff authority ?

Answered: 1 week ago

Question

Discuss the various types of policies ?

Answered: 1 week ago

Question

Briefly explain the various types of leadership ?

Answered: 1 week ago

Question

=+j Improve the effectiveness of global and virtual teams.

Answered: 1 week ago