在C语言中指数运算怎么用呀
c语言中指针运算要用pow()函数,例如2的4次方要写成这样:
pow(2,4);
^在c语言中是一个位操作符,作用是按位异或。
注意,pow()函数要包含math.h文件
C语言中指数运算应怎么表示
1、c语言中指针运算要用pow()函数,例如2的4次方要写成这样:
pow(2,4);
^在c语言中是一个位操作符,作用是按位异或。
注意,pow()函数要包含math.h文件
2、例程:
#include
#include
int main(void)
{
double ans;
double x=5;
ans=pow(x/101.325,0.19);/*计算(x/101.325)的0.19次方*/
printf(“%lf”,ans);
return 0;
}
C语言的指数运算
#include math.h
#include stdio.h
int main(void)
{
double ans;
double x=5;
ans=pow(x/101.325,0.19);/*计算(x/101.325)的0.19次方*/
printf(“%lf”,ans);
return 0;
}