Lab 6 | Complete Solution
- AceTutor
- Rating : 33
- Grade : A+
- Questions : 0
- Solutions : 823
- Blog : 1
- Earned : $26606.70
NOTE: When you view the two input files, number.txt and message.txt, you can copy the
data that you see on the screen and on your own computer use a simple editor
like notepad or also Visual Studio editor and paste the information in the editor window
and then save the file as a simple .txt file with no formatting information in the file.
Num Description
1 Write a complete C++ program to read the integers in the file
numbers.txt and report to cout how many numbers are in the
file and the sum of all the numbers. Copy and paste the
output to your source file.
Then modify the file numbers.txt by adding the numbers 224 and
543 at the end of the file. Run your program again and copy
and paste this second output to your source file.
NOTE: For end-of-file processing for a file of numbers,
review the sample programs presented in class.
2 Write a complete C++ program to read the file message.txt,
character by character using the .get( ) member function.
See page 338 for the .get member function.
See page 356 for end-of-file character processing.
If the character is not a Lower Case letter, write the character
to a file “upper.txt”. If the character is a Lower Case letter,
write the Upper Case version of the character to the file
upper.txt
Your output file should look like:
TODAY BILL SMITH ATE 3 APPLES AND 2 PEARS.
[Solved] Lab 6 | Complete Solution
- This solution is not purchased yet.
- Submitted On 27 Mar, 2016 08:58:46
- AceTutor
- Rating : 33
- Grade : A+
- Questions : 0
- Solutions : 823
- Blog : 1
- Earned : $26606.70