Page 1 of 1

Please do this in C++ with explanation. Thank you. Also the data.txt is- 43 67 82 0 35 28 - 64 7 - 87 0 0 0 0 12 23 45 7

Posted: Tue Jul 12, 2022 8:22 am
by answerhappygod
Please do this in C++ with explanation. Thank you.
Also the data.txt is-
43678203528- 647- 8700001223457- 2- 8- 3- 94010- 723- 24001262100101- 203- 340500023054076
Please Do This In C With Explanation Thank You Also The Data Txt Is 43 67 82 0 35 28 64 7 87 0 0 0 0 12 23 45 7 1
Please Do This In C With Explanation Thank You Also The Data Txt Is 43 67 82 0 35 28 64 7 87 0 0 0 0 12 23 45 7 1 (186.49 KiB) Viewed 22 times
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 zero's are in the file. Your program will also sum up all the numbers and find the average (since you're 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: ] output.bet - Notepad File Edit Format View Help 430​670​820​012​3523​2845​−647​7−2​−87−8​0−3​ −9​4​0​1​0​−7​23​−240​0​ 1254​620​10076​101​−203​−340​500​0​23​0 There are 27 evens, which includes 12 zeros Total number of odds are: 16 The sum of numbers =558 The average is 12 - Your program should be modular. It should contain at least 3 functions (including main). You can have more than 3 functions, but at a minimum should have 3 . - You must use function prototypes in your program