Created
November 17, 2020 06:54
-
-
Save coke12103/8c80542c4db14a66180bc5ac9c32a5f9 to your computer and use it in GitHub Desktop.
Nimを始めて合計で3日目ぐらいで何を書いてるんだろう
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
import random, strformat, unicode | |
proc yubaba():string = | |
randomize(); | |
echo "契約書だよ。そこに名前を書きな。" | |
var keiyakusho = proc (): string = stdin.readLine | |
var name = keiyakusho().toRunes | |
echo fmt"フン。{name}というのかい。贅沢な名だねぇ。" | |
var new_name = name[rand(name.len-1)] | |
echo fmt"今からお前の名前は{new_name}だ。いいかい、{new_name}だよ。分かったら返事をするんだ、{new_name}!!" | |
result = $new_name | |
discard yubaba() | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment