#include<iostream>
using namespace std;
int main()
{
//float(4字节),double(8字节)
float f1 = 3.14f;//编译器默认小数为double,之后多做一步转换,加了f之后,则默 认为float
int a=sizeof(f1);
cout << a << endl;
//科学计数法
float f2 = 3e2;
cout << f2 << endl;
float f3 = 3e-2;
cout << f3 << endl;
system("pause");
return 0;
}
网友评论