Question: drawn before he (she) can win. Write an interactive C program that will encode or decode a line of text. To encode a line of

 drawn before he (she) can win. Write an interactive C program

drawn before he (she) can win. Write an interactive C program that will encode or decode a line of text. To encode a line of text, proceed 9.49 as follows: 1. Convert each character, including blank spaces, to its ASCII equivalent. 2. Generate a positive random integer. Add this integer to the ASCII equivalent of each character. The same random integer will be used for the entire line of text. 3. Suppose that NI represents the lowest permissible value in the ASCII code, and N2 represents the highest permissible value. If the number obtained in step 2 above (i.e, the original ASClI equivalent plus the random integer) and add the remainder to N1. Hence, the encoded number will always fall between N1 and N2, and will always represent some ASCII character. N2, then subtract the largest possible multiple of N2 from this number, 4. Print the characters that correspond to the encoded ASCII values. The procedure is reversed when decoding a line of text. Be certain, however, that the same random number is used in decoding as was used in encoding

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!