当前位置:编程学习 > C/C++ >>

float有效位数

#include <iostream>

 

using namespace std;

 

int main()

{

float a = 2.31111111111;

cout<<(float)a<<endl;

float b = 22.221111111111;

cout<<b<<endl;

float c = 0.22111111111;

cout<<c<<endl;

return 1;

}

 

 

 

 

2.31111

22.2211

0.221111

补充:软件开发 , C语言 ,
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,