#include<bits/stdc++.h>
using namespace std;
const double eps=1e-
2;
bool f(
double x)
{
if(x>(
int)(x+
0.5))
{
if(x-(
int)(x+
0.5)<
eps)
return true;
}
else
{
if((
int)(x+
0.5)-x<
eps)
return true;
}
return false;
}
int main()
{
cout<<f(
1.000000000002)<<
endl;
return 0;
}
转载于:https://www.cnblogs.com/spzeno/p/11297312.html
转载请注明原文地址: https://mac.8miu.com/read-74000.html