Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a function name evenNumbers that accepts an input stream and an output stream as parameters. 8 THE evenNumbers PROBLEM Write a function named evenNumbers

Write a function name evenNumbers that accepts an input stream and an output stream as parameters.

image text in transcribed

8 THE evenNumbers PROBLEM Write a function named evenNumbers that accepts accepts an input stream and an output stream as parameters. The input stream represents an input file containing a series of integers, and report various statistics about the integers. You may assume that there is at least one integer in the file. Report the total number of numbers, the sum of the numbers, the count of even numbers and the percent of even numbers. For example, if an input stream named input, opened with the file numbers.txtcontains the following text: 57 28 9 10 12 98 7 14 20 22 then the call evenNumbers (input, cout); should produce the following output: 12 numbers, sum = 214 8 evens (66.67%)

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

Sams Teach Yourself Beginning Databases In 24 Hours

Authors: Ryan Stephens, Ron Plew

1st Edition

067232492X, 978-0672324925

More Books

Students also viewed these Databases questions

Question

6. Testing equipment that will be used in instruction.

Answered: 1 week ago