(Written in C)   As a signals officer in the British BEF stationed in northern France, you were handed top secret information regarding the flight plan and time of the next mission to be flown by the German Ace known as the Red Baron. You are tasked with encoding the message and sending it to the Canadian squadron stationed along the planned flight to so that an intercept force capable of shooting down the Red Baron could engage him with a reasonable chance of success. The message should be encoded with level 2 top secret encryption so that the german code breackers would not be able to gleen any hint of the nature of the message since the coding algorithm has only been used for the last week only. The machine used is a mechanical computer that could be programed with the C programming language. Write a program that as follows: Display a menu with three options. Option 1to encode a message, option 2 to decode, and option 3 to exit. The program runs in a loop till option 3 is selected.   To encode a message: - Asks the user for a message that is less than 30 characters long all lower case. - Load the message into an array of characters of length 100 named cat. - Add to the end of the message (salting) the phrase: cats are wonderful creatures 10 10. - Output the string contained in cat. - Create array dog of 100 characters. - Create the following string in array dog: cats sometimes scratch people - Copy the string from array cat to array dog to be added to the existing string in dog. - Subtract the number 3 from each character in array dog. - Output the string contained in dog. (transmit this msg to the Canadians). Todecode a message: - Ask the user for the encoded message and load it into arrat cat. - Apply the encoding algorithm in reverse.

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter2: Problem Solving Using C++using
Section2.2: Programming Style
Problem 4E: (For thought) a. A token of a computer language is any sequence of characters, with no intervening...
icon
Related questions
Question
(Written in C)
 
As a signals officer in the British BEF stationed in northern France, you were handed top secret information
regarding the flight plan and time of the next mission to be flown by the German Ace known as the Red Baron.
You are tasked with encoding the message and sending it to the Canadian squadron stationed along the planned
flight to so that an intercept force capable of shooting down the Red Baron could engage him with a reasonable
chance of success.
The message should be encoded with level 2 top secret encryption so that the german code breackers would not
be able to gleen any hint of the nature of the message since the coding algorithm has only been used for the last
week only. The machine used is a mechanical computer that could be programed with the C programming
language.
Write a program that as follows:
Display a menu with three options. Option 1to encode a message, option 2 to decode, and option 3 to exit. The
program runs in a loop till option 3 is selected.
 
To encode a message:
- Asks the user for a message that is less than 30 characters long all lower case.
- Load the message into an array of characters of length 100 named cat.
- Add to the end of the message (salting) the phrase: cats are wonderful creatures 10 10.
- Output the string contained in cat.
- Create array dog of 100 characters.
- Create the following string in array dog: cats sometimes scratch people
- Copy the string from array cat to array dog to be added to the existing string in dog.
- Subtract the number 3 from each character in array dog.
- Output the string contained in dog. (transmit this msg to the Canadians).
Todecode a message:
- Ask the user for the encoded message and load it into arrat cat.
- Apply the encoding algorithm in reverse.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 3 images

Blurred answer
Knowledge Booster
Fundamentals of Boolean Algebra and Digital Logics
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr