hp12c
15 February 2013

Rubyにおける算術演算の基礎2

─問題─

Rubyにおける次のコードの出力を答えよ(10点、制限時間30秒)。

a, b, *c, d = %w(1 2 3 4)
x = a + b + c * d * 2
puts x



















─答え─

"1233"







─解説─

ブコメ参照せよ。

以上。


小学校6年間の算数が6時間でわかる本 by 間地 秀三



Please enable JavaScript to view the comments powered by Disqus. blog comments powered by Disqus
ruby_pack8

100円〜で好評発売中!
M'ELBORNE BOOKS


AltStyle によって変換されたページ (->オリジナル) /