testing-repository/cpp/algorithms/problem4.cpp

10 lines
204 B
C++
Raw Normal View History

2021-11-16 16:35:53 +08:00
//http://acm.hdu.edu.cn/showproblem.php?pid=2003
#include <cstdio>
int main(int argc,char ** argv){
double x;
while(scanf("%lf",&x)!=EOF){
printf("%.2f\n",x>0?x:-x);
}
return 0;
}