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

你可能感兴趣的:(float)