In this exercise I am using Visual Studio 2019 and a modified version of the std_lib_facilities header found here.
Chapter 21 // Exercise 14
Write a program (using the output from the previous exercise) to answer questions such as:
"How many occurrences of 'ship' are there in a file?"
"Which word occurs most frequently?"
"Which is the longest word in the file?"
"Which is the shortest?"
"List all words starting with 's'"
"List all four letter words."
Github:
So I know now why he wanted us to replace all punctuation with whitespace. It makes checking for words starting with certain characters a nightmare....it also makes words longer/shorter than they appear.
I didn't make this one interactive as the next one does that.
No comments:
Post a Comment