Question: String original _ substring is read from input. Then, sentence is read from input. If original _ substring is in sentence, then: Output 'Found at
String originalsubstring is read from input. Then, sentence is read from input. If originalsubstring is in sentence, then:
Output 'Found at index: followed by the index of the first occurrence.
Create a string from sentence with the first two occurrences of originalsubstring replaced by # and output sentence on a
newline.
Otherwise, output 'Not available'.
Click here for example
ubstring input
sentence input
String originalsubstring is read from input. Then, sentence is read from input. If originalsubstring is in sentence, then:String originalsubstring is read from input. Then, sentence is read from input. If originalsubstring is in sentence, then:
Output 'Found at index: followed by the index of the first occurrence.
Create a string from sentence with the first two occurrences of originalsubstring replaced by # and output sentence on a
newline.
Otherwise, output 'Not available'.
Click here for example
ubstring input
sentence input
Output 'Found at index: followed by the index of the first occurrence.
Create a string from sentence with the first two occurrences of originalsubstring replaced by # and output sentence on a newline.
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
