float Abs1(float x){ float res = 0; if(x>=0)res = x; else res = -1*x; return res; } void main(){ float ab = -20.2; printf("%f的绝对值为:%f",ab,Abs1(ab));}