-
总时间限制:
- 1000ms 内存限制:
- 65536kB
-
描述
-
输入一个浮点数,输出这个浮点数的绝对值。
输入
- 输入一个浮点数,其绝对值不超过10000。 输出
- 输出这个浮点数的绝对值,保留到小数点后两位。 样例输入
-
-3.14
样例输出
-
3.14
源码
#include <iostream>
#include <iomanip>
#include <cmath>
using namespace std;
int main()
{
double d;
cin >> d;
cout << fixed << setprecision(2) << fabs(d) << endl;
return 0;
}