htpot函数 ( 计算直角三角形的斜边长)

来源:互联网 发布:三国霸业 源码 编辑:程序博客网 时间:2024/04/28 04:25

头文件是#include<math.h>

示例:

#include<stdio.h>#include<math.h>int main(){    float a = 3,b = 4;    float c = hypot(a,b);    printf("%.2f\n",c);    return 0;}//输出是5.00


0 0