.Open CSCI202 Lab06 -- Stream . Goal learn to read input, count things, and produce formatted output . Deliverable -- Programs to count characters, words, and lines . Resource -- the book and the web . Note -- End of file You signal the end of the input (cin) by ending the line and holding down the key and taping the letter D. .Open Process . Write a program to count the characters in a file In this program every character counts as one -- even spaces, tabs, and end-of-line. You need to find the correct way to get one char from an fstream to make the algorithm work. Algorithm to count characters input .( declare and set a counter to zero. declare a variable to hold a char WHILE the program can get a char from the input stream DO .( add 1 to the counter .) END WHILE Output a report to the user with the value of the counter .) . Develop a program to count words in a file As far as this program is concerned, a word is a string with no spaces, tabs, or end of line characters. So "1+2" and "mouchoir" are both words. Copy the character counter program into a new file and modify it to read and count C++ strings rather than chars. String input reads one "word" at a time. Strong hint: do NOT use the old C char*/cstring library. . Develop a program to count lines in a file Each line -- even a blank line, counts as a line. Again by selecting the right operator you can make this program by copying the previous one and making some small changes. .Close . Grading -- How much did you get done in 2 hours Done means: it (1) works and (2) is clean code. .Close