第九周练习
2 写一个求x、y的平方和的平方根的函数,并在main中执行
/* Note:Your choice is C IDE */
#include "stdio.h"
#include "math.h"
double pingfanghe(double a,double b,double c)
{
return sqrt(a*a+b*b+c*c);
}
int main(){
double a,b,c,r;
scanf("%lf",&a);
scanf("%lf",&b);
scanf("%lf",&c);
printf("a=%f,b=%f,c=%f,r=%f,",a,b,c,pingfanghe(a,b,c));
}