This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: You will also have to use conditional statements to check for the ends of files. 3. Now add the following content to your existing textfile: a) I Love 6.096 too! b) Several more lines added by the user (inputting should continue as long as the user wishes – ask the user after every line he/she inputs!) 4. Finally, count and print: a) The number of occurrences of the letter ‘O’ in your file File 3.txt. b) The number of occurrences of the word “Love” in your file File3.txt (You can use the strcmp() function of file cstring here, or compare using string objects, with which you can use the == operator)...
View Full Document
This note was uploaded on 11/14/2011 for the course DDDD h0322 taught by Professor Whoknow during the Spring '11 term at Bina Nusantara University.
- Spring '11