[SOLVED] COP3223 Homework 10

30.00 $

Programming resource
Digital learning resource
Category:
✓ Practical programming resource
✓ Suitable for guided study and reference
✓ Tutor guidance available when needed

Description

5/5 - (1 vote)

You and your roommate are creating a secret code.

You have a rather simple scheme to express strings of letters as numbers.
You realize that since there are only 26 different letters, a string of letters can be viewed as a number in ba For example, consider the word:

COMPUTER

You realize that we can just assign numeric values to the letters with A = 0, B = 1, C = 2, , Z = 25 and then Thus, the value of COMPUTER would be:

2×26^7 + 14×26^6 + 12×26^5 + 15×26^4 + 20×26^3 + 19×26^2 + 4×26^1 + 17×26^0.

Fill in the two functions to encode and decode your messages.
One function takes in a string and its length, and returns a number (stored in a data type called long long) e
The second function will take in a number and the length of the corresponding word and print out the corres

Resource details

Understand the Task Before You Use the Resource

Review the requirements, identify the programming concepts involved, study the implementation and test your understanding with your own examples and modifications.