0
  1. 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.

Sample run:
Enter a 4-digit number to encrypt: 5278
The encrypted number is: 2945

3
Contributors
2
Replies
20
Views
3 Years
Discussion Span
Last Post by jwenting
0

A company were to set that requirement for "security" I'd hand back the assignment and tell them I won't be responsible for the inevitable breach of security.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.