格式化十进制值 [英] Formatting the decimal value

查看:84
本文介绍了格式化十进制值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我有以下一行数据。


I / P:

20200107 1180.3489999999999 223.56720000000001 191.21019999999999

我想将这些数据写入两位小数的文件。


O / P:

20200107 1180.35 223.57 191.21


它的语法是什么?


谢谢

PSB

Hi,

I have the following row of data.

I/P:
20200107 1180.3489999999999 223.56720000000001 191.21019999999999

I would like to write this data to the file with two decimal places.

O/P:
20200107 1180.35 223.57 191.21

What is the syntax of it?.

Thanks
PSB

推荐答案





我有以下一行数据。


I / P:

20200107 1180.3489999999999 223.56720000000001 191.21019999999999



O / P:

20200107 1180.35 223.57 191.21


什么是语法它是什么?


谢谢

PSB
Hi,

I have the following row of data.

I/P:
20200107 1180.3489999999999 223.56720000000001 191.21019999999999

I would like to write this data to the file with two decimal places.

O/P:
20200107 1180.35 223.57 191.21

What is the syntax of it?.

Thanks
PSB

展开 | 选择 | Wrap | 行号


展开 < span class =codeDivider> | 选择 | Wrap | Line数字


展开 | 选择 | 换行 | 行号


这篇关于格式化十进制值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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