开平方使用sqrt()函数
使用方法:
包含于math.h头文件
sqrt(float * number),返回number的开平方数,返回值为浮点型
c=(int) sqrt((double)a*a+b*b);
c=(int) sqrt((float)a*a+b*b);
开平方使用sqrt()函数
使用方法:
包含于math.h头文件
sqrt(float * number),返回number的开平方数,返回值为浮点型
c=(int) sqrt((double)a*a+b*b);
c=(int) sqrt((float)a*a+b*b);