• 程序的逻辑是正确的。但如果我们输入 0.13 这样的小数,程序会给出 0 1 0 这样的分数形式,也就是分母为 0。这明显是不正确的。

    请思考为什么会出现这种情况,以及应该如何避免这种情形的出现?

    Edited by Vincent Wei
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment