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

Member Avatar for iamthwee

Yep we don't do homework. Best help you'll get is if you start to post what YOU HAVE done so far.

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.