#include <iostream>
#include <string.h>
#include <ctype.h>
using namespace std;
int main()
{
system("Color 1A");
char clear[200];
char cipher[200];
int x,i;
cout << "what do you want to do with your password " << endl;
cout << "1 Encrypt your password " << endl;
cout << "2 Decrypt your password " << endl;
cout<<" Enter a string:";
cin.getline(clear,sizeof(clear));
x = strlen(clear);
// Encryption
for(i=0; i<=x-1; i++)
{
if (isspace(clear[i]))
{
cipher[i] = clear[i];
}
else
{
cipher[i] = clear[i]+3;
}
}
// Decryption
for(i=0; i<=x+2; i++)
{
if (isspace(cipher[i]))
{
clear[i] = cipher[i];
}
else
{
clear[i] = cipher[i]+4;
}
}
cout<<" Encrypted:" << cipher << endl;
cout<<" Decrypted:" << cipher << endl;
system("pause");
return 0;
}
i don't know how to finish that need help
plz
i dont know how to do this in caesar cipher
help plz