Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Assume you are working as a programmer in a communication field. Your task is to alter the original data before transmitting because of a security
Assume you are working as a programmer in a communication field. Your task is to alter the original data before transmitting because of a security reason. All of their data is an integer that contains the number of digits between two and eight (inclusive), thus the possible integers are between 10 and 99999999. You have to read in an integer and complete the following stages. Stage 1: Your task is to modify the data for transmission according to the following set of rules. 1. If the number is a two digit number you swap the positions of the numbers (eg: if the number is 56, altered number is 65). 2. If the number is a three digit number, digits at positions 1 and 3 are swapped, (eg: number is 123, altered number is 321) 3. If the number is four digits or above the following rules apply. Replace the first digit by the remainder after the sum of that digit plus 1 is divided by 10, the second digit by the remainder after the sum of that digit plus 2 is divided by 10, third digit by the remainder after the sum of that digit plus 3 is divided by 10, fourth digit by the remainder after the sum of that digit plus 4 is divided by 10 and so on
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started