Posted by: Sparty December 9, 2014
Need Help Decoding C++
Login in to Rate this Post:     0       ?        
I don't know if this will help you in your assignment. I can't write in C++, but here is the algorithm that I would use to write in my choice of language.
1. declare a string with alphabets, s = "abcd....z"
2. read the characters in your code one by one and count them
3. The most frequently used letter is 'e' (roughly 12%)
4. based on that I would find the rotation of the character in your code. By rotation I mean find the index of your character in the string 's' and subtract index of e, in this case it is 4.
5. Now shift each of your characters by that rotation, but leave the punctuations and blank spaces as they are.
6. After decoding see if it makes sense.

This might not work in your code, but you can give it a try.
Hope that helps
Read Full Discussion Thread for this article