原型:extern float hypot(float x, float y);
用法:#include <math.h>
功能:对于给定的直角三角形的两个直角边,求其斜边的长度。
说明:返回斜边值。
举例:// hypot.c #include <syslib.h> #include <math.h> main() { clrscr(); // clear screen textmode(0x00); // 6 lines per LCD screen printf("3^2+4^2=%.0f^2\n",hypot(3.,4.)); printf("3.2^2+4.3^2=%.2f^2",hypot(x,y)); getchar(); return 0; }相关函数:frexp,ldexp