Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I am so utterly confused on the topic of file I/O for C plus plus, and my prof d

ID: 3528761 • Letter: I

Question

I am so utterly confused on the topic of file I/O for C plus plus, and my prof did not do a thorough job explaining. The syntax for creating identifiers for the infiles, outfiles, etc etc I don't know ughhh! I'm using Visual Studio 2010. This is a lab assignment that was given in class today and has to be submitted by 6 PM est, this evening:

_______

You are to write a program that will read 50 integers from a file and analyze them. After all 50 are read, you will print the max and min. You will also output to a file how many numbers were odd, and how many were even (zeros may be considered even). Your program MUST employ a while loop to read the values from the file.

The while loop should check for TWO things (what are they?). Hint: you know you need to read 50 numbers, but for correct file processing, what else should you check for? Your grade will be based on whether or not you correctly identify both conditions to be used in the while loop.

Hint: Copy the data from the given file into a NOTEPAD file. Save the file to the same directory as your source code. Save all portions of you project to your drive space to avoid problems running your program.

______

Here is the data from the file that is to be used:

(sorry about the length) (the file is a Notepad file named: Lab7file.txt)

66

44

-3

11

42

21

-5

6

-12

22

-15

33

-7

-10

5

20

69

43

14

49

17

32

54

-17

-6

-4

10

25

39

55

18

16

0

3

26

39

-1

49

20

15

8

11

36

64

-20

71

59

50

20

48

A sincere thank you to anyone for help.


Explanation / Answer

//here you go

//comment if you need something changed or have questions

https://www.dropbox.com/s/lzcphgo347ec52q/Lab7fileProcessor.cpp.txt

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote