题目:
123 -234.00
123.00 234.00
题目分析:
简单题。
代码如下:
/*
* i.cpp
*
*hdu 2003
* Created on: 2015年3月20日
* Author: Administrator
*/
#include <iostream>
#include <cstdio>
#include <cmath>
using namespace std;
int main(){
double temp;
while(scanf("%lf",&temp)!=EOF){
printf("%.2lf\n",fabs(temp));
}
return 0;
}
原文:http://blog.csdn.net/hjd_love_zzt/article/details/44560543