#include<iostream>
#include<cmath>
#include<iomanip>
using namespace std;
int main()
{
double n, ans;
while(cin >> n)
{
ans = abs(n);
cout << fixed;
cout << setprecision(2) << ans << endl;
}
return 0;
}
HDU 2003
最新推荐文章于 2019-03-18 20:48:45 发布
本文展示了一个简单的C++程序,该程序通过使用标准库函数读取用户输入的浮点数,并输出其绝对值,保留两位小数。
181

被折叠的 条评论
为什么被折叠?



