-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9a48692
commit bc06d49
Showing
3 changed files
with
77 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,33 @@ | ||
# File handling | ||
# Caesar's Cipher Encryption | ||
|
||
## Problem | ||
|
||
Given a binary file, do something | ||
Given a clear text string and an integer shift, return the ciphertext. | ||
The space is limited to [a-zA-Z]. | ||
|
||
Examples: | ||
You must retain case | ||
|
||
Examples: | ||
|
||
- "Super secret message", 10 should return "Cezob combod wocckqo" | ||
- "Can you read this", 1 should return "Dbo zpv sfbe uijt" | ||
- "NO", 5 should return "ST" | ||
- "Edge case", 40 should return "Srus qogs" | ||
|
||
## Instructions | ||
|
||
Design a program/script that can do something with the given file | ||
Design a program/script that can return ciphertext using the Caesar Algorithm. | ||
|
||
Your program will need to run in a loop, listing to stdin. | ||
An input will be given in two lines. | ||
|
||
``` | ||
cleartext | ||
shift integer | ||
``` | ||
|
||
and your output should be just the ciphertext followed by a newline. | ||
|
||
All test cases will be longer than one character. | ||
If your program receives a "q\n" as an input, it must exit gracefully and quietly. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters