ruby编写的乘法口诀代码

清华大佬耗费三个月吐血整理的几百G的资源,免费分享!....>>>

TEST_FILE_NAME = '乘法口诀.txt'
#创建文件
File.open(TEST_FILE_NAME, 'w+') do |file|
  
for x in 1..9
   for y in 1..x
     if x==y
       file.print y,"×",x,"=",x*y,"\n"
       file.puts ""  #加入空行,美观作用
     else
     file.print y,"×",x,"=",x*y," "
     end
   end 
 end
 end