How about a dumb program?
It turns out that words are legible if you put the letters in any order, as long as the first and last letter are kept correct. So I quickly threw something together that will scramble any sentence I typed in, and played a prank on a friend.
Code:
#include <string>
#include <iostream>
#include <cctype>
#include <algorithm>
using namespace std;
int main()
{
string word;
bool done = false;
while (cin >> word) {
string::iterator last = word.begin() + word.length() - 1;
if (ispunct(*last)) {
if (*last == '.' || *last == '?' || *last == '!') {
done = true;
}
last--;
}
random_shuffle(word.begin()+1, last);
cout << word << ' ';
if (done) {
cout << '\n';
break;
}
}
return 0;
}
only made it for my use, but if anyone wants to have some fun/ make it better feel free.