1、(1)hypot函数的功能是计算一直角三角形的斜边长度。
(2)函数hypot(x,y)表示根据直角三角形的两直解边长度x和y计算其斜边的长度。或者是从标点(x,y)到原点的距离,该函数的算法等同于sqrt(x*x+y*y)。
#include<iostream>
#include<string.h>
#include<stdio.h>
#include<ctype.h>
#include<algorithm>
#include<stack>
#include<queue>
#include<math.h>
using namespace std;
int main()
{
double m,n;
while(scanf("%lf%lf",&m,&n)!=EOF)
{
double w=hypot(m,n);
printf("%f\n",w);
}
return 0;
}