c语言pow用法

来源:互联网 发布:2017办公室软件下载 编辑:程序博客网 时间:2024/06/05 03:41
转自:http://zhidao.baidu.com/link?url=4QHcN_LHiPOITGb94NOx1lRV6V-MmztWA5pNEuGDLPTajCZbFpvxXEbKv-ABoKeuCanBDrna2CQSsTKqOvl62q
原型:extern float pow(float x, float y);   用法:#include <math.h>   功能:计算x的y次幂。   说明:x应大于零,返回幂指数的结果。   举例:   // pow.c   #include <syslib.h>   #include <math.h>   main()   {   clrscr(); // clear screen   textmode(0x00); // 6 lines per LCD screen   printf("4^5=%f",pow(4.,5.));   getchar();   return 0;   }
0 0