Hi, I have a program that can jumble one word while keeping the beginning and end characters. How do I do that to an entire sentence an entire sentence. For example, my program currently prints "Enter a word to jumble" I want it to be enter a sentence to jumble the words while keeping them in the same position? Would probably need an array or vector right?
Enter a sentence to jumble
Call me Ishmael. Some years ago--never mind how long precisely--having little or no money in my
purse, and nothing particular to interest me on shore, I thought I would sail about a little and see
the watery part of the world.
Call me Ihesmal. Smoe yreas ago--neevr mind how lnog pilcresey--havnig lttile or no menoy in my
purse, and nntohig pcutilarar to iserntet me on srhoe, I tguhhot I wuold sail auobt a lltite and see
the wertay prat of the wolrd.
[edit: Fix to avoid calling jumbleMiddle with two iterators to sentence.end(), which avoids incrementing said iterator to sentence.end() and causing undefined behavior.]