求绝对值

#include <iostream>
#include <cstdio>
#include <cmath>
#define PI 3.1415927
using namespace std;

int main()
{
	double a;
	while(~scanf("%lf", &a))
	{
		printf("%.2f\n", fabs(a));
	}
	
	return 0;
}

  

posted @ 2019-07-23 15:23  青衫客36  阅读(90)  评论(0编辑  收藏  举报