Created
March 27, 2015 06:35
-
-
Save narita1980/66467901e0fe3b2ab7dd to your computer and use it in GitHub Desktop.
言語処理100本ノック 2015_第1章: 準備運動_01. 「パタトクカシーー」
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
package main | |
func Substring(s string, i int) string { | |
runes := []rune(s) | |
return string(runes[i]) | |
} | |
func main() { | |
str := "パタトクカシーー" | |
println(Substring(str, 1) + Substring(str, 3) + Substring(str, 5) + Substring(str, 7)) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment