Write a file secret_code.c which allows you to scan in messages encrypted with Tom's Secret Code,...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Write a file secret_code.c which allows you to scan in messages encrypted with Tom's Secret Code, and then print them out (ending in a newline). Tom's Secret Code works two letters at a time. Given some ciphertext (text that has been encrypted with Tom's Secret Code), take the first two letters. The first letter of the plaintext (unencrypted text) is the letter with the smaller ascii value of those two encrypted letters. For example, if the first two letters of ciphertext were "GD", the first letter of the plaintext would be "D". To explain the code, the following diagram demonstrates how the code "CZUOMUPP1i5fg112" is decrypted as "COMP1511". In each pair of letters, the one with the lower ascii value was the one that was part of the plaintext. Cipher Text CZUOMUPP1i5 f g 1 12 67 90 117 79 77 85 80 80 49 105 53 102 103 49 49 50 ASCII Values Correct Answer C O M P 1 5 1 1 Your program should behave exactly as these examples do: $ ./secret_code abbccddeeffggh abcdefg (ctrl-D] Write a file secret_code.c which allows you to scan in messages encrypted with Tom's Secret Code, and then print them out (ending in a newline). Tom's Secret Code works two letters at a time. Given some ciphertext (text that has been encrypted with Tom's Secret Code), take the first two letters. The first letter of the plaintext (unencrypted text) is the letter with the smaller ascii value of those two encrypted letters. For example, if the first two letters of ciphertext were "GD", the first letter of the plaintext would be "D". To explain the code, the following diagram demonstrates how the code "CZUOMUPP1i5fg112" is decrypted as "COMP1511". In each pair of letters, the one with the lower ascii value was the one that was part of the plaintext. Cipher Text CZUOMUPP1i5 f g 1 12 67 90 117 79 77 85 80 80 49 105 53 102 103 49 49 50 ASCII Values Correct Answer C O M P 1 5 1 1 Your program should behave exactly as these examples do: $ ./secret_code abbccddeeffggh abcdefg (ctrl-D] Write a file secret_code.c which allows you to scan in messages encrypted with Tom's Secret Code, and then print them out (ending in a newline). Tom's Secret Code works two letters at a time. Given some ciphertext (text that has been encrypted with Tom's Secret Code), take the first two letters. The first letter of the plaintext (unencrypted text) is the letter with the smaller ascii value of those two encrypted letters. For example, if the first two letters of ciphertext were "GD", the first letter of the plaintext would be "D". To explain the code, the following diagram demonstrates how the code "CZUOMUPP1i5fg112" is decrypted as "COMP1511". In each pair of letters, the one with the lower ascii value was the one that was part of the plaintext. Cipher Text CZUOMUPP1i5 f g 1 12 67 90 117 79 77 85 80 80 49 105 53 102 103 49 49 50 ASCII Values Correct Answer C O M P 1 5 1 1 Your program should behave exactly as these examples do: $ ./secret_code abbccddeeffggh abcdefg (ctrl-D] Write a file secret_code.c which allows you to scan in messages encrypted with Tom's Secret Code, and then print them out (ending in a newline). Tom's Secret Code works two letters at a time. Given some ciphertext (text that has been encrypted with Tom's Secret Code), take the first two letters. The first letter of the plaintext (unencrypted text) is the letter with the smaller ascii value of those two encrypted letters. For example, if the first two letters of ciphertext were "GD", the first letter of the plaintext would be "D". To explain the code, the following diagram demonstrates how the code "CZUOMUPP1i5fg112" is decrypted as "COMP1511". In each pair of letters, the one with the lower ascii value was the one that was part of the plaintext. Cipher Text CZUOMUPP1i5 f g 1 12 67 90 117 79 77 85 80 80 49 105 53 102 103 49 49 50 ASCII Values Correct Answer C O M P 1 5 1 1 Your program should behave exactly as these examples do: $ ./secret_code abbccddeeffggh abcdefg (ctrl-D]
Expert Answer:
Answer rating: 100% (QA)
Here is an implementation in C for decoding messages encrypted with Toms Secret Code c ... View the full answer
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date:
Students also viewed these programming questions
-
For example, of the $47,000 ending balance in work in process, $22,560 was applied overhead. Required: 1. Identify reasons for entries (a) through (d). 2. Assume underapplied or overapplied overhead...
-
You are required to write a Python program that will manage character (heroes and villain) information. Character (hero and villain) information will be stored in a text file that will be read in...
-
Read the case study, Should Companies Embrace Social Business? on page 75 of the textbook. Prepare your definition of the uses of a social network from a personal standpoint, as well as professional...
-
You are the manager of a large car dealership. At present, you rely on a large pool of dealers to sell your product, but you have noticed recently that consumer opinion appears to be turning away...
-
What would a horizontal aggregate supply curve imply about producer behavior? How about a vertical AS curve?
-
What does the future look like for Health Care Information Technology in terms of software development, education, research, and practices? What challenges could arise?
-
How can a corporation that has its offices out of state be served?
-
LLL Avionics Ltd. has contacted your certified general accounting firm to inquire about the cost of an external audit. The company's president explained that he feels that "the previous auditor...
-
Phil Farmer just sold his farm to his nephew. The terms of the sale are that the nephew will pay Phil $ 4 0 0 / acre each year for the next 3 5 years. What is the equivalent sales price ( $ / acre )...
-
1 Golden Steer 2 3 General Journal 4 Date 5 Part B 6 7 8 9 _0 11 2 13 4 15 6 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 10 1 12 13 14 15 16 +7 18 19 50 51 52 53 54 65 56 57...
-
Matt Lim is a 45-year-old Singaporean. He has been working for Micro Inc (Micro), a company tax resident in Country X for the past 10 years. Micro is listed on the Stock Exchange of Country X. To be...
-
Because Americans are increasingly health conscious, they are drinking more bottled water than ever before. Your Task. For each of the above numbered sentences, select the letter that identifies its...
-
The Federal Trade Commission targeted deceptive diet advertisements by weight-loss marketers. Your Task. When indirectness or tact is required, use passive-voice verbs. Revise the above sentence so...
-
Workers were asked to wear badges with tiny sensors to monitor their communication and activity patterns at Bank of America. Your Task. Business writing is more forceful when it uses active-voice...
-
Which sentence is more emphatic? Why? a. The new restaurant will attract foot traffic and also serve unique burgers. b. The new restaurant will attract foot traffic and, most important, will serve...
-
Coca-Cola hired a creative director PepsiCo tried a new bottle design. Your Task. Identify the sentence fault (fragment, run-on sentence, comma splice). Then revise to remedy the fault.
-
Use the Newton-Raphson method to find the root of the equation e-3x=0 that lies between 0 and 1. (10 Marks)
-
What kind of financial pressures can an LBO cause?
-
Cypress Corporation has regular taxable income of $170,000 (assume annual gross receipts are greater than $5 million) and regular tax liability of $49,550 for 2012. The corporation also has tax...
-
Carl and Jenny adopt a Russian orphan. The adoption takes 2 years and two trips to Russia and is final in 2012. They pay $6,000 in 2011 and $7,500 in 2012 of qualified adoption expenses, and have AGI...
-
Quince Interests is a partnership with a tax year that ends September 30, 2012. During that year, Potter, a partner, received $3,000 per month as a guaranteed payment, and his share of partnership...
-
What is automatic control?
-
A block diagram is represented by (a) circles (b) triangles (c) rectangles (d) parallelograms
-
What is a transducer? Explain the principle of operation of a transducer.
Study smarter with the SolutionInn App