0
我想收集民意调查的答案,但我无法得到它的工作。我怎样才能收集我的投票答案?
当我尝试round_up
和ceil
,我得到10x
百分比(超过100%,最多101%)。
值的示例:
33.3333333333
16.6666666667
50
我想收集民意调查的答案,但我无法得到它的工作。我怎样才能收集我的投票答案?
当我尝试round_up
和ceil
,我得到10x
百分比(超过100%,最多101%)。
值的示例:
33.3333333333
16.6666666667
50
为什么不直接使用round()
?
应该导致:
33
17
50
round(33.3333333333, 2); //result: 33.33
round(16.6666666667, 2); //result: 16.67
round(50, 2); //result: 50
+1,但基于他已经在使用,他只想整数部分。 – 2010-09-04 18:16:25
你有权利,它工作得很好。 – marc 2010-09-04 18:18:39
我的胖子,我正在使用“圆形”。 非常感谢;) – marc 2010-09-04 18:19:22