Last active
May 8, 2021 04:10
-
-
Save hyuki/313c0cf2bfda860a4fa7069353bc05a6 to your computer and use it in GitHub Desktop.
kuku.rb - 唱えやすい九九 - https://twitter.com/hyuki/status/1390875436255629314
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
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 |
Author
hyuki
commented
May 8, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment