diff options
| author | mo khan <mo@mokhan.ca> | 2025-01-22 18:06:49 -0700 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2025-01-22 18:06:49 -0700 |
| commit | 7f03450427ceb527d7752d66dd3200a57e09a6b1 (patch) | |
| tree | df63ff8df6c59778ef2c6c962254622a0a81ff8e /assignments | |
| parent | 1b281e9b926d546dd781c2841b6fca94e61f3a97 (diff) | |
Format the assignment 3 output
Diffstat (limited to 'assignments')
| -rw-r--r-- | assignments/3-solution.md | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/assignments/3-solution.md b/assignments/3-solution.md index 478de5a..3403327 100644 --- a/assignments/3-solution.md +++ b/assignments/3-solution.md @@ -109,17 +109,23 @@ Chapter 8: > 9. Using a Caesar cipher with s = 5, decode the received message RTAJ TZY FY IF -```plaintext -| A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | - -Key: s = 5 - -| F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | A | B | C | D | E | - -| Ciphertext | RTAJ TZY FY IFBS | -| Plaintext | MOVE OUT AT DAWN | -``` +The following code can be used to decipher the Caesar cipher. ```ruby !include assignments/3/caesar.rb ``` + +The plaintext is `MOVE OUT AT DAWN`. + +```bash +$ ruby caesar.rb +# Caesar Cipher + +| --------------- | --------------------------------------------------- | +| Plain Alphabet | A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z | +| Cipher Alphabet | F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,A,B,C,D,E | +| --------------- | --------------------------------------------------- | +| Key | 5 | +| Ciphertext | RTAJ TZY FY IFBS | +| Plaintext | MOVE OUT AT DAWN | +``` |
