Transmit data in encrypted way (digit + 7) mod 10 asked in ZENSAR 2022 march


 A company wants to transmit data over the telephone line, but they are concemed that their lives are tapped All of their data is transmitted as four-digit integers. They decided to encrypt a four digit number as follows 

1: They will replace each digit by (digit+7) mad 10). 

2: They will then swap the first digit with the third digit and the second digit with the foun The resulting four-digit number is then encrypted number 

Write a program that can do an encryption operation. The program must take one input.

 The input is a positive integer depending on the input.


 Codes are in two methods 
1. without using function
2. Using a function and returning an array



connect with me on

1st Method :-

***********************************************************
2. Using a function which retins an array 





connect with me on

Comments

Popular posts from this blog

PERFECT SQUARE asked by MountainBlue

Harry and Porter asked in MountainBlue ,2022

Chomsky's hierarchy Explanation :