I will prepare files of “random” integers for you. The numbers will be stored 1 per line. Your program will:
Prompt the user for the name of the datafiles to use (note: you can call your output file anything you
While there is data in the file
Read an integer
If the integer is even, add it to the even sum
If the integer is odd, add it to the odd sum
Be sure to check for an empty file. If there is, report this to the user and stop the program right there (exit).
o When there is no more data, output the sum of the even integers and the sum of the odd integers TO A TEXTFILE.
When I compile it doesn't seem to find the text or I may be doing something wrong
Enter file name: Ints1.txt
File not found or cannot be opened.
Make sure path is correct.
Press any key to continue . . .