Question: C or C++ ONLY! Functional Requirements Write a program that receives a 5-digit integer number from user and perform encryption and decryption on it as

C or C++ ONLY!

Functional Requirements

Write a program that receives a 5-digit integer number from user and perform encryption and decryption on it as follows:

Encryption: Every single digit will be increased by 3. For example 1 goes to 4, 6 goes to 9, 7 goes to 0, 8 goes to 1, etc

Decryption: Every single digit will be decreased by 3. For example, 9 goes to 6, 3 goes to 0, 2 goes to 9, 1 goes to 8, etc.

Structure of your program will look like this:

int data;

void Encrypt() {

//your code here

}

void Decrypt() {

//your code here

}

void main() {

//get data from user

//encrypt

Encrypt();

//save and print encrypted value here

//decrypt

Decrypt();

//save and print decrypted value here

//compare decrypted data and original data to make sure they are ok

//print a message saying encryption was successful or not

}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!