c语言如何表示10^8

来源:学生作业帮助网 编辑:作业帮 时间:2024/07/13 10:05:17
c语言如何表示10^8
xSKo@+ GZ RpTuRj[ EH UK@-JhBi ʼn$vxH3|64? A2'ZusŴ472g?RSfvts_G2_W,hw[qxl'~~^S^8'ig|GCLGD7K`r\4ML9W\{ՂݲJ.ApesS)lZdU]ʍm)..$dΡt

c语言如何表示10^8
c语言如何表示10^8

c语言如何表示10^8
原型:extern float pow(float x, float y);

用法:#include

功能:计算x的y次幂.

说明:x应大于零,返回幂指数的结果.

举例:
// pow.c

#include
#include
#include
void main()
{
printf("4^5=%f",pow(4.,5.));
getchar();
}
#include
#include
void main( void )
{
double x = 2.0, y = 3.0, z;
z = pow( x, y );
printf( "%.1f to the power of %.1f is %.1f ", x, y, z );
}
Output
2.0 to the power of 3.0 is 8.0
C语言中计算X的N次方,不能用POW函数
#include
int main(void)
{
int i, n;
int repeat, ri;
double mypow, x;
scanf("%d", &repeat);
for(ri = 1; ri