求绝对值

http://acm.hdu.edu.cn/showproblem.php?pid=2003

   1 /*written by czk*/
   2 #include <stdio.h>
   3 #include <math.h>
   4 
   5 int main() {
   6     double r;
   7     while(scanf("%lf", &r) != EOF)
   8         printf("%.2f\n", fabs(r));
   9 }

hdu2003 (2008-06-01 15:51:59由czk编辑)

ch3n2k.com | Copyright (c) 2004-2020 czk.