题目链接
难度:入门
题解
round(x)函数 返回对x进行四舍五入后的结果,返回值为浮点型。
#include <iostream>
#include <cmath>
using namespace std;
int main()
{
double x;
cin >> x;
cout << round(x);
return 0;
}
#include <iostream>
#include <cmath>
using namespace std;
int main()
{
double x;
cin >> x;
cout << round(x);
return 0;
}