// Basic Encryption / Decryption // By Ice_Dragon #include int main() { int e; char str[50]; char ans; cout << "Please Enter The String To Encrypt:\n"; cout << "String: "; cin >> str; for(e=0;str[e]!='\0';e++) // Although this looks confusing, all it basically does is increases our strings ASCII code by 5, therefore scrambles it :) str[e]+=5; cout<<"\n\nYour Encrypted String Is:\n"; cout<> ans; switch (ans) // Good example of a Switch statement, gets user input, and then basically, if the user types { // 'y' (yes) it then executes the first block of code, which decrypt's the string. // Or if the user inputs 'n' (no) - exits the application. case 'y': for(e=0;str[e]!='\0';e++) // Gets our encrypted string, which has been increased by +5 of the ASCII, and then -5's it, str[e]-=5; // Therefore giving us back our untampered string. cout <<"\n\nYour Decrypted String Is:\n\n"; cout <