Difference between revisions of "Secret Code"

From CompSciWiki
Jump to: navigation, search
Line 1: Line 1:
 
 
== Secret Code ==
 
== Secret Code ==
  
  
The following string of text has a secret code encrypted inside it.
+
The following string of text has a secret code encrypted inside it:
 +
 
 +
xmydartlkarrsgeoptwwjvbodeblxgbleivetoihewt
 +
 
 +
In order to decipher it, you will need to:
 +
 
 +
1) Extract every fourth letter of the string
 +
2) Reverse the order of the extracted letters
 +
3) Set the case of the extracted letters so that they alternate between uppercase and lowercase, with the first letter being uppercase.
 +
 
 +
To solve this problem:
 +
You will need three string variables:
 +
- one called "message" to store the above string to be deciphered

Revision as of 12:15, 1 April 2010

Secret Code

The following string of text has a secret code encrypted inside it:

xmydartlkarrsgeoptwwjvbodeblxgbleivetoihewt

In order to decipher it, you will need to:

1) Extract every fourth letter of the string 2) Reverse the order of the extracted letters 3) Set the case of the extracted letters so that they alternate between uppercase and lowercase, with the first letter being uppercase.

To solve this problem: You will need three string variables: - one called "message" to store the above string to be deciphered