Translate the following pseudocode for randomly permuting the characters in astring into
Chapter 4, Problem P4.10(choose chapter or problem)
Translate the following pseudocode for randomly permuting the characters in astring into a C++ program.Read a word.Repeat word.length() timesPick a random position i in the word.Pick a random position j > i in the word.Swap the letters at positions j and i.Print the word.To swap the letters, construct substrings as follows: Then replace the string withfirst + word.substr(j, 1) + middle + word.substr(i, 1) + last
Unfortunately, we don't have that question answered yet. But you can get it answered in just 5 hours by Logging in or Becoming a subscriber.
Becoming a subscriber
Or look for another answer