Caesar Encryption

Julius Caesar protected his confidential information by encrypting it in a cipher. Caesar's cipher rotated every letter in a string by a fixed number, making it unreadable by his enemies. In the original cipher only letters were encrypted, symbols such as spaces, -, ., ... were left unencrypted.

Required knowledge

This challenge is solvable from the moment you know how to make decisions, loop and know about Strings.

Challenge

Use the caesar encryption cypher to encrypt a string provided by the user. However, compared to the original also encrypt printable symbols. A good subset of the ASCII values are decimal values 32 (space) to 126 ~.

ASCII Table

The key should be any valid integral value.

Example:

Solution

The solution can be found here.

Last updated