[C++] Need help about encryption

Newbie Spellweaver
Joined
Apr 3, 2009
Messages
71
Reaction score
0
Can anyone make a code for this problem.

A company wants to transmit data over the telephone, but is concerned that its phones may be tapped. It has asked you to write a program that will encrypt the data so that it may be transmitted more securely. All the data is transmitted as integers (valid range is 0 to 9999). Your application should read a sequence of integers separated by space until a number outside the valid range is entered. Each number should be encrypted as follows:

(A) replace each digit with the result of adding 9 to the digit and getting the remainder after dividing the new value by 10
(B) swap the first digit with the third,
and (C) swap the second with the fourth. The resulting sequence of four-digit encrypted integer should then be printed immediately. Do not provide any message prompt

*the input numbers should be inputted continuously until the user press the enter key.

Thank you.
 
Back