码迷,mamicode.com
首页 > 其他好文 > 详细

求平方根

时间:2019-05-06 20:48:04      阅读:135      评论:0      收藏:0      [点我收藏+]

标签:std   math   can   scan   printf   float   oat   turn   int   

#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);
}

求平方根

标签:std   math   can   scan   printf   float   oat   turn   int   

原文地址:https://www.cnblogs.com/3w1z3/p/10821881.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!