Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

THIS HAS TO BE IN C + + LANGUAGE! Lab 3 Page 1 of 1 Write a program that reads a series of integers from

THIS HAS TO BE IN C++ LANGUAGE! Lab 3 Page 1 of 1 Write a program that reads a series of integers from a data file (name of data file is data.txt, this file has been provided for you). The program will classify the numbers as odd or even. Zero should be classified as even and display how many zeros are in the file. Your program will also sum up all the numbers and find the average (since youre only working with integers, you will use integer division to find the average). Data file is of unspecified length; that is, the program does not know in advance how many numbers are in the file. Your program should write the output in a separate text file. Name this file: output.txt The output.txt file should display the numbers read from the data file but should only display 10 numbers per line. Below is a screenshot of the output.txt 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

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

T Sql Window Functions For Data Analysis And Beyond

Authors: Itzik Ben Gan

2nd Edition

0135861446, 978-0135861448

More Books

Students also viewed these Databases questions