[HDU] [2003] Find the Absolute Value

Problem Description

Loading...

Problem Analysis

Nothing much to say… completely meaningless
Just simple counting, I guess…
Uh… by the way, will I get called out for padding things out with a problem like this…

cpp
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
#include<stdio.h>
int main()
{
    double n;
    while(scanf("%lf",&n)!=EOF)
    if(n>0)
    {
    printf("%.2lf\n",n);
    }
    else
    {
    printf("%.2lf\n",n=-n)  ;
    }
    return 0;
}

Loading...