首页
移动开发
物联网
服务端
编程语言
企业开发
数据库
业界资讯
其他
搜索
c语言float、double数据保留2位小数
其他
2018-09-26 18:57:28
阅读次数: 0
float
sp =
36.51647
; sp
=( (
float
)( (
int
)( (sp+
0.005
)*
100
) ) )/
100
;
挺实用的。double也可以。
猜你喜欢
转载自
www.cnblogs.com/airduce/p/9708795.html
c语言float、double数据保留2位小数
double类型的数据保留2位小数
JAVA float double数据类型保留2位小数点5种方法
double 保留2位小数
JAVA Double 类型数据保留2位小数
java Double如何保留2位小数
Java float保留2位或多位小数
float默认保存6位小数,通过类比double保留12位小数
将double或则float类型保留小数
Java float浮点型保留2位小数
c# 让double保留两位小数
java对Double型数据保留n位小数点
java的float浮点型数据保留两位小数
Java Float Double浮点保留两位小数的三种实现方法
C++保留2位小数输出
C# 保留2位小数
C++ 保留2位小数
保留2位小数
C/C++ int运算结果转float/double 保留小数
Java 将String转Double、Double类型保留2位小数
double保留两位小数
double 保留两位小数
【Java】 float保留两位小数
Java后端将Strng字符串类型转Double和float,及保留两位小数
ios NSString format 保留小数点 float double
Float保留两位小数或多位小数
【C语言程序设计】编写程序,输入一个正整数i;计算如下级数的值,保留2位小数。定义和调用函数double m(int i),用递归方法实现。
java保留2位小数
js 保留2位小数
python保留2位小数
今日推荐
周排行
成为C++高手之宏与枚举
在CAD二次开发中使用进度条
Js插件ECharts,HighCharts学习网址整理
Celery提交任务出错(on windows.)
cephfs内核客户端性能追踪
thinkphp中PHPExcel用法
EntityFramework动态组合多排序字段
汇编语言(八)实验9 根据材料编程
安装ubuntu后必须做的事情(对我而言)
JS函数式编程
每日归档
更多
2024-10-22(0)
2024-10-21(0)
2024-10-20(0)
2024-10-19(0)
2024-10-18(0)
2024-10-17(0)
2024-10-16(0)
2024-10-15(0)
2024-10-14(0)
2024-10-13(0)