HDU-2003

求绝对值。

 1 #include<stdio.h>
 2 #include<stdlib.h>
 3 #include<math.h>
 4 #include<string.h>
 5 int main()
 6 {
 7     double r;
 8     while (scanf("%lf",&r)!=EOF)
 9         if (r>=0) printf("%.2lf
",r);
10         else printf("%.2lf
",-r);
11     return 0;
12 }
原文地址:https://www.cnblogs.com/leiyuxiang/p/3489712.html