65,211
社区成员
发帖
与我相关
我的任务
分享
#include <iostream>
#include <cstdio>
using namespace std;
int main()
{
float fTemp = 0.03;
cout.precision(20);
cout<<fTemp<<endl;
system("pause");
}
int Fun ( float data )
{
if ( data > 0 )
return static_cast<int> ( data + 0.5 );
else
return static_cast<int> ( data - 0.5 );
}
#include <iostream>
#include <vector>
using namespace std;
int main()
{
float fTemp = 0.03;
fTemp *= 1000;
long lTemp = (long)fTemp;
cout<<fTemp<<" "<<lTemp<<endl;
}