Question: in C++ please Write a word search and word count program. 1) Assign the following text to a string constant. (Matthew 22:34-40, ESV) But when
Write a word search and word count program. 1) Assign the following text to a string constant. (Matthew 22:34-40, ESV) But when the Pharisees heard that he had silenced the Sadducees, they gathered together. And one of them, a lawyer, asked him a question to test him. "Teacher, which is the great commandment in the Law And he said to him, "You shall love the Lord your God with all your heart and with all your soul and with all your mind. This is the great and first commandment. And a second is like it: You shall love your neighbor as yourself. On these two commandments depend all the Law and the Prophets." I 2) Prompt the user to enter a word or phrase 3) Search the string given by the user from the text above and inform how many times the word/phrase was found in the text. This should not be case sensitive and it should find multiple forms of the word. For example, a search for "law" would be found 3 times (lawyer, Law, and Law). (Hint: You need to use while loop, find and.length function from string library. Also, you will need to use stringunpow.) Turn in the following on Blackboard: 1) Your SOURCE CODE Cepp file ONLY, such as main.cpp, filename.cpp. It is NOT sin or any other extensions) 2) Search for the following (ALL string searches are NOT CASE-SENSITIVEI) a God b, commandment claw d love elle El teacher 3) Word document (no other type of document, not PDF, not Pages, etc) with Screenshots your program's output using the six test cases above
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
