Hey guys I have a program that I need to write and I have no idea how to do it:
this program has to prompt the user in a menu to encrypt a message, decrypt or quit.
I'm supposed to use functions in this program
This is what i am supposed to use without removing any parts, just adding things where needed.
CODE
#include<iostream>
using namespace std;
int menu();
void encrypt(int);
void decrypt();
int main(){
int choice;
int shift = 7; // default shift
choice = menu();
while (choice != 3){
if (choice == 1){
cout << "Enter the 'shift' value: ";
cin >> shift;
encrypt(shift); }
else
decrypt();
cout<<endl<<endl<<endl;
choice = menu();
}
return 0;
}
I don't even know how to get started functions kind of confuse me
Can someone at least point me in the right direction?
When you enter a message its supposed to print out numbers and vice versa when decrypted, the numbers are as follows:
1= k 10= q 19 =t
2 =n 11 =s 20 =v
3 =h 12 =i 21= f
4 =b 13 =y 22 =e
5 =w 14 =x 23 =m
6 =a 15 =j 24 =u
7 =d 16 =r 25 c
8 =l 17 =z 26 p
9 =o 18= g 27 =. (period)