Hi, I need this in C++. I am a bit confused on using the string find() function.
Posted: Mon Jul 11, 2022 9:49 am
Hi,
I need this in C++.
I am a bit confused on using the string find() function.
3.18 LAB: Phrases and subphrases Write a program that reads two phrases on separate lines and outputs one of the four responses: 1) Phrase one is found within phrase two 2) Phrase two is found within phrase one 3) Both phrases match 4) No matches Hint: Use the string function find(). Ex: If the input is: fire firetruck the output is: fire is found within firetruck Ex: If the input is: the green grass grows green grass 1:04 AM 7/10/2022 4
fire is found within firetruck Ex: If the input is: the green grass grows green grass the output is: green grass is found within the green grass grows Ex: If the input is: pick a card pick a card the output is: Both phrases match Ex: If the input is: apples oranges ■ 1:04 AM 7/10/2022
I need this in C++.
I am a bit confused on using the string find() function.
3.18 LAB: Phrases and subphrases Write a program that reads two phrases on separate lines and outputs one of the four responses: 1) Phrase one is found within phrase two 2) Phrase two is found within phrase one 3) Both phrases match 4) No matches Hint: Use the string function find(). Ex: If the input is: fire firetruck the output is: fire is found within firetruck Ex: If the input is: the green grass grows green grass 1:04 AM 7/10/2022 4
fire is found within firetruck Ex: If the input is: the green grass grows green grass the output is: green grass is found within the green grass grows Ex: If the input is: pick a card pick a card the output is: Both phrases match Ex: If the input is: apples oranges ■ 1:04 AM 7/10/2022