求平方根

Posted on 2019-05-06 20:29  18软工五班吴赞  阅读(62)  评论(0)    收藏  举报

#include<stdio.h>
#include<math.h>
int main()
{
float sqrt_2(int x,int y);
int a,b;
float z;
scanf("%d%d",&a,&b);
z=sqrt_2(a,b);
printf("%.2f",z);
}
float sqrt_2(int x,int y)
{
float c;
c=sqrt(x*x+y*y);
return(c);
}

博客园  ©  2004-2026
浙公网安备 33010602011771号 浙ICP备2021040463号-3