Our FREE site is mostly funded by the Amazon ads ⇓below⇓.
Support us by clicking ⇑above⇑ next time you plan to buy a product on Amazon.
using namespace std;
cout << "Please enter your paragraph: \n";
cout << "\nHello, your paragraph is:\n " << paragraph << "!\n";
cout << "\nThe size of your paragraph = " << paragraph.size() << " characters. \n\n";
cout << "\nThe paragraph is empty" << endl;
cout << "Please enter the word you are searching for: ";
cout << "Hello, your word is " << word << "!\n";
if (paragraph.find(word) == string::npos)
cout << word << " does not exist in the sentence" << endl;
cout << "The word " << word << " is now found at location " << paragraph.find(word) << endl