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