作者godfat (godfat 真常)
看板Ruby
标题Re: [无脑]脱力比亚Ruby
时间Wed Sep 13 01:16:08 2006
※ 引述《linjack (嗯)》之铭言:
: --- 九九乘法
: 1.upto(9) { |i|
: 1.upto(9) { |j|
: printf "%d*%d=%2d ", i, j, i*j
: }
: print "\n"
: }
: ---
90.times{ |i|
printf "%d*%d=%2d ", i/10+1, i%9+1, (i/10+1)*(i%9+1)
puts if (i+1)%9 == 0
}
好像很烂 = =b
只是把双回圈拆成单回圈而已
--
Hear me exalted spirits. Hear me, be you gods or devils, ye who hold
dominion here:
I am a wizard without a home. I am a wonderer seeking refuge.
Sacrifice
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 61.228.85.72