Question
C++ A company wants to transmit data over the telephone, but they are concerned that the phones may be tapped. All of their data are
C++
A company wants to transmit data over the telephone, but they are concerned that the phones may be tapped. All of their data are transmitted as four-digit integers. They have asked you to write a program that encrypts their data so that it can be transmitted more securely.
1) Your Program should prompt the user and read the total number of data to be encrypted
2) Your program should read a four-digit integer (only one input) and encrypt it as follows: Replace each digit by (the sum of that digit plus 7 ) modulus 10. Then, swap the first digit with the third, swap the second digit with the fourth and print the encrypted integer.
NOTE: Comments and Indentations must be included in this program and future programs, if not, points will be deducted.
OUTPUT SAMPLE:
Please Enter how many numbers you intend to Encrypt:3
Enter a four digit number.
4512 lst DIGIT Replacement using modulus
1289
ENCRYPTED
8912
Enter a four digit number.
1234
lst DIGIT Replacement using modulus
8901
ENCRYPTED
0189
Enter a four digit number.
9876
lst DIGIT Replacement using modulus
6543
ENCRYPTED
4365
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started