Quick!.........C++ question

Bluga

Banned
Nov 28, 2000
4,315
0
0
Example:

enter : 3-Ehzduh ri wkh Iodpqj Olcdugv
the secret message: Beware of the Flaming Lizards

enter : 4-Evi csy lezmrk JYR
the secret message: Are ou having FUN

Question:
007 has a special watch that can decode secret message... for example, the digit represents how many letter forward is the correct alphabet.we need to write the decryption algorithm for the watch. there will be no numbers in the messages, nor will there be any punctuation.Like in the first example, there is 3, and then "E" is after that... E --->D -->C--> "B", so the decoded message has B for the first letter Write the program.
 

BowDown

Banned
Jun 2, 2000
2,197
0
0
Just scan it in as a string, and then modify each place of the string like so...

string[0] -= 'whatever is in the 4th position of the ASCII Chart'

And do that until you hit the '\0'.