Created
February 13, 2014 19:00
-
-
Save sambaiz/8981525 to your computer and use it in GitHub Desktop.
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
#シーザー暗号 | |
#ruby caesar.rb piyopiyo -2 | |
#ngwmngwm | |
def caesar_cipher(str, shift) | |
str.split(//).each {|c| print (c.ord + shift.to_i).chr} | |
end | |
caesar_cipher(ARGV[0], ARGV[1]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment