A company wants to transmit data over the network, but they areconcerned that th
ID: 3613473 • Letter: A
Question
A company wants to transmit data over the network, but they areconcerned that their network might be insecure. All of the data istransmitted as four-digit integers. They have asked you to write aC program that will encrypt their data so that it may betransmitted more securely. Your program should read a four digitinteger and encrypt it as follows: replace each digit by theremainder after the sum of that digit and 7 is divided by 10. Thenswap the first digit with the third, and swap the second digit withthe fourth. Then print the encrypted integer and write a seperateprogram that inputs an encrypted four-digit integer and decrypts itto form the original number.a) Try it by hand first, 4567 should be encoded into 3412. And 3412should be decoded
into 4567.
b) What is the encrypted number for 2678?
c) What does 9217 decrypts to?