Skip to content

Instantly share code, notes, and snippets.

@hyuki
Last active May 8, 2021
Embed
What would you like to do?
kuku.rb - 唱えやすい九九 - https://twitter.com/hyuki/status/1390875436255629314
yomi = {
"2" => 'に',
"3" => 'さ',
"4" => 'し',
"5" => 'ご',
"6" => 'む',
"7" => 'な',
"8" => 'は',
"9" => 'く',
}
(6..8).to_a.each do |x|
(2..9).to_a.each do |y|
printf("%1d×%1d=%2d %s%s%d\n", x, y, x * y, yomi[x.to_s], yomi[y.to_s], x * y)
end
puts
end
@hyuki
Copy link
Author

hyuki commented May 8, 2021

6×2=12  むに12
6×3=18  むさ18
6×4=24  むし24
6×5=30  むご30
6×6=36  むむ36
6×7=42  むな42
6×8=48  むは48
6×9=54  むく54

7×2=14  なに14
7×3=21  なさ21
7×4=28  なし28
7×5=35  なご35
7×6=42  なむ42
7×7=49  なな49
7×8=56  なは56
7×9=63  なく63

8×2=16  はに16
8×3=24  はさ24
8×4=32  はし32
8×5=40  はご40
8×6=48  はむ48
8×7=56  はな56
8×8=64  はは64
8×9=72  はく72

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment