Question: One way to hide a word is to insert it inside a written sentence. For example, hiding the word SECRET at position 5 inside the
One way to hide a word is to insert it inside a written sentence. For example, hiding the word SECRET at position 5 inside the sentence I WENT TO THE SUPERMARKET produces the new sentence WENSECRETHE SUPERMARKET. Write a C++ program that prompts the user to enter a sentence, a word, and an integer representing the insertion position and then prints the new sentence. Remember that in C++ indexing starts with 0. Sample input/output: Enter a sentence: This is a test sentence to hide a word Enter a word: wiziwig Enter the insertion point: 9 The new sentence is: This is awiziwigentence to hide a word
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
