All pastes #991634 Raw Edit

Anonymous

public text v1 · immutable
#991634 ·published 2008-04-21 05:41 UTC
rendered paste body
// Basic Encryption / Decryption 
// By Ice_Dragon

#include<iostream.h>

  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++)
     str[e]+=10;

    cout<<"\n\nYour Encrypted String Is:\n";
    cout<<str;
	cout<<"\n\n\n";

	cout << "Do You Wish To Decrypt This String?  (y/n)\n";
	cout << "Answer: ";
	cin >> ans;

	switch (ans)
     {

     case 'y':

	for(e=0;str[e]!='\0';e++)
     str[e]-=10;

	cout <<"\n\nYour Decrypted String Is:\n\n";
	cout <<str;
	cout << "\n\n";

         break;

	 case 'n':

		cout<<"\nExiting Application...\n\n";

		return 0;

  }
	return 0;
  }