Question: C++ program - Please comment it out... A company wants to transmit data over the Internet but is concerned about the security of the sensitive

C++ program - Please comment it out...

A company wants to transmit data over the Internet but is concerned about the security of the sensitive data. All of the data are transmitted as four-digit integers. The company asked you to write a program that encrypts the data so that it can be transmitted securely. Your program should read a four-digit integer and encrypt it as follows: Replace each digit (the sum of that digit plus 7) modulus 10. Then, swap the first digit with the third, swap the second with the fourth and print the encrypted integer. Add decryption functionality to your program above that inputs an encrypted four-digit integer and decrypts it to form the original number.

Expected Output:

(i)

Enter a four-digit number: 3456

Encrypted number is 2301

Enter an encrypted number: 2301

Decrypted number is 3456

(ii)

Enter a four-digit number: 0005

Encrypted number is 7277

Enter an encrypted number: 7277

Decrypted number is 5

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!