1 #include<iostream> 2 #include<string> 3 4 using namespace std; 5 6 int main()
ID: 3938790 • Letter: 1
Question
1 #include<iostream>
2 #include<string>
3
4 using namespace std;
5
6 int main()
7 {
8 char message[100];
9 char output[100];
10
11 int key, count;
12
13 cout << "Enter encrypted message : ";
14 cin.getline(message,100);
15
16 for(key = 1; key <= 100; key++)
17 {
18 for(count = 0; message[count] !=''; count++)
19 {
20 if(message[count] - key < 32)
21 output[count] = message[count] - key + 127 - 32;
22 else
23 output[count] = message[count] - key;
24 }
25
26 cout << "Decrypted message using Key " << key << " : ";
27 cout << output << endl;
28 }
29
30 }
can you help me separate these into 3 functions? I keep getting errors.