#t223. 输出绝对值
输出绝对值
Output Absolute Value
Problem Description
Given a floating-point number, output its absolute value.
Input Format
The input is one floating-point number whose absolute value does not exceed 10000.
Output Format
Output the absolute value of the floating-point number, kept to two decimal places.
Sample Input
-3.14
Sample Output
3.14
Hint
- The input may be a negative decimal (see the sample) — read it with
double. - Absolute value: a negative number becomes positive, a positive number stays the same — or use
fabs(from<cmath>). - Keep two decimal places.