A military company wants to transmit dataover the telephone, but they are concer
ID: 3615594 • Letter: A
Question
A military company wants to transmit dataover the telephone,
but they are concerned that their phonesmay be tapped. All of their data is
transmitted as four-digit integers. Theyhave asked you to write a program
that encrypts their data so that it may betransmitted more securely. Your
program should read a four-digit integerand encrypt it as follows: Replace
each digit by:(the sum of that digit plus 7) modulus10.
Then, swap the first digit with the third,swap the second digit with the
fourth, and print the encrypted integer.