小楼寂寞新雨月 发表于 2014-9-14 11:43:28

C标准库之数学函数pow

功能:求x的y次方的值
函数原型:double pow(double x,double y);

要求:
函数需要的头文件
pow<math.h>
参数:
参数说明
x双精度数
y双精度数
返回值:x的y次方的值
举例:#include <stdio.h>
#include <math.h>
int main()
{
double a = 3,b= 5,c;//为变量赋初值
c = pow(a,b);         //求a的b次方的值
printf("%f\n",c);
}



小败类 发表于 2014-9-17 15:43:21

基本

一克米 发表于 2014-12-18 09:41:40

{:1_1:}
页: [1]
查看完整版本: C标准库之数学函数pow