#include<iostream>
using namespace std;
int main()
{
float fInput;
while (cin>>fInput)
{
int nTemp;
nTemp = fInput * 10;
int nHight = nTemp / 10;
int nLow = nTemp % 10;
if (nLow >= 5)
{
nHight++;
}
cout << nHight;
}
return 0;
}
华为机试-取近似值
最新推荐文章于 2021-04-02 20:30:47 发布