求绝对值

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

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

  

原文地址:https://www.cnblogs.com/mjn1/p/11232008.html