Avuya Mxoli

Avuya Mxoli

  • NA
  • 236
  • 208.5k

Encryption

Sep 22 2011 12:43 PM
Hi All,

 I need help with a question here: I need to encrypt a 4 digit number in the ff way: add 7 and mod by 10 each digit then swap dgt1 with 3, 2 with 4. Then after that I need to decrypt the encrypted number. I need this in pseudocode but c# is welcome too. I know I have to store the user input in an array then manipulate it using a for loop then do the operations on each digit storing the results seperately. I then will have a function that will swap the digits as stated. I'm just not sure of how to apply this logically plz help in that regard oh and I have no clue on how to decrypt  the number.
Thanks

Answers (3)