Title【2003】

#include<stdio.h>
intmain()
{
	double t;
	while(scanf("%lf",&t)!=EOF)
	{
		if(t<0) t=-t;
		printf("%.2lf\n",t);
	
	}
	
}


Problem Description [2003]
Find the absolute value of real numbers.
 

Input
input data has multiple groups, each group occupies one line, and each line contains a real number.
 

Output
For each set of input data, output its absolute value, require each set of data to output one line, and retain two decimal places for the result.
 

Sample Input
123
-234.00
 

Sample Output
123.00
234.00
This question is also a relatively simple question. If there is a problem, it may be in the if condition or when it is output. Pay attention.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325588109&siteId=291194637