subject

Your mission is to read this uber-classified memo from the Grand Poobah of annan. Of course, it's in code, so you'll need to write a program to decrypt your message. The code is set up so that for the nth element in the array, you will need to read its nth letter. (Ex: if pirates is in array position 0, then print letter 0 of the word, which = p. if gangway is in array position 4, then print letter 4 = w.) To accomplish this, your main function should do the following: a. Declare 4 separate arrays of strings called secrets1, secrets2, secrets3, & secrets4 and assign them the following values:

1. secrets1: { "platypus", "plethora","trend", "croak","almost", "toaster" };
2. secrets2: { "fire", "seen","trend", "produce" };
3. secrets3: { "tiretread", "chains", "stern", "bed bug" };
4. secrets4: { "oracle", "stetson","mother", "stie", "twigrot" }

b. Call the function decode 4 times - once for each array variable (secrets1, secrets2, secrets3 & secreets4) from Step a. (You'll have to do this with 4 lines of code; you can't use a loop for it.)

c. Write a void function called decode that will 1. Accept an array of strings, and the integer array length as the parameters. ii. Read through each word in the array. If the word is in the nth position of the array, then print the nth letter for that word. (For array item 0, print the letter at position 0 in the word. For array item 1, print the letter at position 1 in the word...etc.) Print all of the letters from this array on one line. iii. Print a blank line

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 01:30
Consider the following statements: #include #include class temporary { private: string description; double first; double second; public: temporary(string = "", double = 0.0, double = 0.0); void set(string, double, double); double manipulate(); void get(string& , double& , double& ); void setdescription(string); void setfirst(double); void setsecond(double); }; write the definition of the member function set() so that the instance variables are set according to the parameters. write the definition of the constructor so that it initializes the instance variables using the function set() write the definition of the member function manipulate() that returns a decimal number (double) as follows: if the value of description is "rectangle", it returns first * second if the value of description is "circle" it returns the area of a circle with radius first if the value of description is "cylinder" it returns the volume of a cylinder with radius first and height second. hint: the volume of a cylinder is simply the area of the circle at the base times the height. if the value of description is "sphere" it returns the volume of the sphere with radius first. otherwise it returns -1.0;
Answers: 1
question
Computers and Technology, 22.06.2019 11:10
Which are not examples of chronic or persistent stress? moving
Answers: 1
question
Computers and Technology, 23.06.2019 02:00
Arecipients list has been loaded into a document. which commands should be clicked in order to filter the list so that letters will not be printed for recipients who live in a certain state? mailings tab, start mail merge, select recipients, type new list, then insert only contacts from the desired states mailings tab, rules, select recipients, use existing list, then choose a recipients list that includes only contacts in certain states mailings tab, select recipients, use existing list, rules, fill in, then type in certain states mailings tab, rules, skip record select “state” under field name, then type in the state name under “equal to”
Answers: 2
question
Computers and Technology, 23.06.2019 07:00
What are three software programs for mobile computing?
Answers: 1
You know the right answer?
Your mission is to read this uber-classified memo from the Grand Poobah of annan. Of course, it's in...
Questions
question
Mathematics, 21.10.2020 01:01
question
Mathematics, 21.10.2020 01:01
question
Mathematics, 21.10.2020 01:01
question
Mathematics, 21.10.2020 01:01
question
Mathematics, 21.10.2020 01:01
question
Mathematics, 21.10.2020 01:01
Questions on the website: 13722359