擅长:python、mysql、java
<pre><code> print "c is", int(c)
</code></pre>
<p>整数转换将只删除小数点后的任何内容,因此即使您有344.9999999989,它也将始终向下舍入。
你可以用老式的印刷品%</p>
^{pr2}$
<p>如果你想要一个整数,你可以用round</p>
^{3}$
<p>另外,您可能对立方体根问题的其他解决方案感兴趣
<a href="http://mail.python.org/pipermail/tutor/2009-January/066485.html" rel="nofollow noreferrer">here</a></p>