HDU 2003 to find the absolute value

Source: Internet
Author: User

Seek absolute valueTime limit:2000/1000 MS (java/others) Memory limit:65536/32768 K (java/others)
Total submission (s): 83122 Accepted Submission (s): 42511


problem Descriptionthe absolute value of a realistic number.  
InputThere are several groups of input data, one for each group, and a real number for each row.  
Outputfor each set of input data, output its absolute value, requiring each set of data output a row, the result is reserved two decimal places.  
Sample Input
123-234.00
 
Sample Output
123.00234.00
source code (water problem)
<span style= "FONT-SIZE:18PX;" > #include <stdio.h> #include <math.h>int main () {    double A, b;    while (scanf ("%lf", &a)!=eof)    {        b=fabs (a);        printf ("%.2lf\n", b);    }    return 0;} </span>


Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

HDU 2003 to find the absolute value

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.