Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Can you please help me with this C++ code? Thank You!! The CIA has contracted your services to write a program to decode the numeric

Can you please help me with this C++ code? Thank You!!

The CIA has contracted your services to write a program to decode the numeric messages they have intercepted. They have noticed that each message consists of a list of integers ending with a -100. The CIA has also determined that the integer 50 corresponds to the blank space character and integers 0 through 39 are valid integers. The characters that integers 0 through 39 correspond to are given in the starter code through a vector. Any integer, positive or negative, other than -100, 50 and 0 through 39 in the message can be ignored.

Your program will be run once for each message to be decoded. First, print out the contents of the vector. Then read in the intercepted message, decode it and output the decoded message.

For example, if the sample input to your program is:

1 11 50 33 37 31 -8 11 50 30 29 8 50 0 29 50 38 29 46 37 31 50 9 29 28 11 39 29 31 21 25 -100

your programs output should contain:

be sure to. do your homework!

==================================================================================================================================

This is the default template:

image text in transcribedThe end result should be:

input: 1 11 2 3 9 -100

output: beach

===================================================

input: -10 28 29 55 35 20 11 -100

output: movie

==========================================================================

input: 9 2 26 26 38 50 33 26 31 20 27 12 50 1 31 11 2 21 25 -100

output: happy spring break!

main.cpp Load default template... 1 #include 2 #include 3 using namespace std; 4 5 int mainO 6 const int N 40; 7 vector

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

Describe the five elements of the listening process.

Answered: 1 week ago