舍入数到2位小数 [英] Round number to exactly 2 decimal places

查看:70
本文介绍了舍入数到2位小数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

任何人都可以告诉我如何将数字精确地舍入两位小数

i使用了一个函数回合(text1.text,2)

但是只要有zere(0)最后它没有显示它

例如圆形功能显示220.3

i想要显示220.30(最后为零)

解决方案

它的紧急情况我以前发过它但是如果有任何身体我没有得到任何信息

知道请帮我这个

can任何身体都告诉我如何在正好两位小数的位置舍入数字

i使用了一个函数回合(text1.text,2)

但是每当有zere(0)最后它没有显示它

例如圆形功能显示220.3

i想要显示220.30(最后为零)


< blockquote> ROUND将显示您现在获得的输出。

无论如何,它不会通过隐藏前导和尾随零来更改变量的值。


如果你想dis播放它们然后编写自己的自定义函数。


或者你可以使用:

展开 | 选择 | 换行 | 行号


can any body tell me how to round numbers in in exactly two decimal places
i had use a function round(text1.text,2)
but whenever there is zere(0) at the end it does not show it
for eg for round function show 220.3
i want to show 220.30 (zero at the end)

解决方案

its urgent i had posted it previously but i get no anwere if any body
know please help me regarding this
can any body tell me how to round numbers in in exactly two decimal places
i had use a function round(text1.text,2)
but whenever there is zere(0) at the end it does not show it
for eg for round function show 220.3
i want to show 220.30 (zero at the end)


ROUND will display the output as you are getting now.
Anyway it is not changing the value of the variable by hiding leading and trailing zeroes.

If you want to display them then write your own customized function.


or you can use:

Expand|Select|Wrap|Line Numbers


这篇关于舍入数到2位小数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆