Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想使用以下代码将有理数保存3/12在变量中:
3/12
rNo = Rational(3, 12) # => 1/4
但 ruby 将数字减少到1/4.
1/4
谁能告诉我如何在我写这些数字时保留它们?