Answer 1:
Pseudocode for encrypt(string in, int shift)
1. declare a output string
2. for i <- 0 to i < in.length()
i. out[i] <- in[i] + shift
3. end for
4. return output string
Answer 2:
Code:

Code as text:
#include <iostream>
using namespace std;
/* function to encrypt string using shift */
string encrypt(string in, int shift) {
string out; // output string
out.resize(in.length());
// loop to shift whole string
for (int i = 0; i < in.length(); i++) {
out[i] = in[i] + shift;
}
return out; // return output string
}
int main() {
// tsting function
cout << encrypt("cat", 3) << endl;
return 0;
}
Sample Run:

Answer 3:
Pseudocode for encrypt(string in, int shift)
1. declare a output string
2. for i <- 0 to i < in.length()
i. out[i] <- in[i] + shift
ii. check if out[i] is in alphabet range, if not then adjust
a. out[i] <- out[i] - 26
ii. end if
3. end for
4. return output string
Answer 4:
Code:

Code as text:
#include <iostream>
using namespace std;
/* function to encrypt string using shift */
string encrypt(string in, int shift) {
string out; // output string
out.resize(in.length());
// loop to shift whole string
for (int i = 0; i < in.length(); i++) {
out[i] = in[i] + shift;
// adjust shifting
if (in[i] >= 'a' && in[i] <= 'z' && out[i] > 'z')
out[i] -= 26;
if (in[i] >= 'A' && in[i] <= 'Z' && out[i] > 'Z')
out[i] -= 26;
}
return out; // return output string
}
int main() {
// tsting function
cout << "cat: " << encrypt("cat", 3) << endl;
cout << "zoo: " << encrypt("zoo", 3) << endl;
return 0;
}
Sample run:

P.s. ask any doubts in comments and don't forget to rate the answer.
in C++, please show step by step with simple codes. thank you. An application from security:...