Skip to content

Instantly share code, notes, and snippets.

@Nia-TN1012
Last active August 29, 2015 14:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Nia-TN1012/3892f08bb0641bcb09d4 to your computer and use it in GitHub Desktop.
Save Nia-TN1012/3892f08bb0641bcb09d4 to your computer and use it in GitHub Desktop.
入力した俳句をシーザー暗号化するプログラムです。
// Auther : Nia Tomonaka
// Twitter : https://twitter.com/nia_tn1012
[<EntryPoint>]
let main argv =
// 入力した俳句をシーザー暗号化します。
// 但し、区切り文字として、半角スペースとカンマはそのままにします。
printf "平文 :"
System.Console.ReadLine()
|> String.map( fun c -> if c = ',' || c = ' ' then c else c + char( 3 ) )
|> printfn "暗号文:%s"
0
// CaesarHaiku.fs
// Copyright (c) 2014-2015 Myoga-TN.net All Rights Reserved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment