赞
踩
- #include <stdio.h>
- #include <math.h>
- #include <stdlib.h>
- /************found************/
- #define FU(m,n) ((m/n))
- float fun(float a,float b,float c)
- { float value;
- value=FU(a+b,a-b)+FU(c+b,c-b);
- /************found************/
- Return(Value);
- }
- void main()
- { float x,y,z,sum;
- printf("Input x y z: ");
- scanf("%f%f%f",&x,&y,&z);
- printf("x=%f,y=%f,z=%f\n",x,y,z);
- if (x==y||y==z){printf("Data error!\n");exit(0);}
- sum=fun(x,y,z);
- printf("The result is : %5.2f\n",sum);
- }
- #include <stdio.h>
- #include <math.h>
- #include <stdlib.h>
- /************found************/
- #define FU(m,n) ((m)/(n))
- float fun(float a,float b,float c)
- { float value;
- value=FU(a+b,a-b)+FU(c+b,c-b);
- /************found************/
- return(value);
- }
- void main()
- { float x,y,z,sum;
- printf("Input x y z: ");
- scanf("%f%f%f",&x,&y,&z);
- printf("x=%f,y=%f,z=%f\n",x,y,z);
- if (x==y||y==z){printf("Data error!\n");exit(0);}
- sum=fun(x,y,z);
- printf("The result is : %5.2f\n",sum);
- }
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。