Derived from problem 2440.
A string containing several sentences are given as input. If any sentence contains the word 'great' more than twice, replace every second 'great' of that sentence with the word 'awesome'.
Example:
Input = 'Sheldon, Penny, Leonard and Raj are great and great and great and great receptively. Wolowitz is just a great jerk';
Output = 'Sheldon, Penny, Leonard and Raj are great and awesome and great and awesome receptively. Wolowitz is just a great jerk';
Solution Stats
Problem Comments
Solution Comments
Show commentsProblem Recent Solvers17
Suggested Problems
-
How to find the position of an element in a vector without using the find function
2822 Solvers
-
Who is the smartest MATLAB programmer?
793 Solvers
-
Simple equation: Annual salary
4271 Solvers
-
07 - Common functions and indexing 5
430 Solvers
-
Cumulative product of a vector
302 Solvers
More from this Author44
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
anything wrong with the server? Its been 14 hours since last submission
Yes there is a problem (yesterday and now).
I agree
:-(
Coffee without Cody. I'll pour some milk and sugar.
Hope servers will be back soon
not fixed yet. Did it happen before for such a long period?
Should be fixed now.
"receptively" ~= "respectively"