Instructions: The user can enter a message with no spaces between the words. Maximum message length is 81 characters. A warning will be displayed if there is some wrong input.
Explanation: This is a classic method for composing secret messages called a square code. The spaces are removed from the english text and the characters are written into a square (or rectangle).
Example:
anabajric
ana baj ric
End result: abr nai ajc
The process looks like this: For example, the sentence "If man was meant to stay on the ground god would have given us roots" - is 54 characters long, and so it is written into a rectangle with 7 rows and 8 columns:
ifmanwas meanttos tayonthe groundgo dwouldha vegivenu sroots
The coded message is obtained by reading down the columns going left to right. For example, the message above is coded as:
imtgdvs fearwer mayoogo anouuio ntnnlvt wttddes aohghn sseoau