- A company wants to transmit data over the telephone. All of the data are transmitted as four-digit integers. The company has asked you to write a program that encrypts the data so that it can be transmitted more securely. Your program should read a four-digit integer and encrypt it as follows: Replace each digit by (the sum of that digit plus 7) modulus 10.
Enter a 4-digit number to encrypt: 5278
The encrypted number is: 2945