Hey, I'm making a program that encrypts a phrase using a Ceaser cipher on which the key or offset is variable. I have very very little experience and I'm stuck on having the user input the to veriables.
int key = 0;// number of spaces to shift text
string input;// phrase to encrypt
int count = 0, length;
cout << "Enter an integer from 1-26 as your key ";
cin >> key;
cout << "Your offset value is: " << key <<endl;
cout << "Enter your phrase: \n";
length = (int)input.length();
for (count = 0; count < length; count++)
input[count] = tolower(input[count]);
for (int i = 0; i < key; i++)
if (input[count] == 'z')
input[count] = 'a';
cout << "Results: \n" << input << endl;
Put the code you need help with here.