回覆列表
-
1 # 姓撒名女內
-
2 # 麗58777572
externfloatpow(floatx,floaty)用法:#include<math.h>功能:計算x的y次冪。說明:x應大於零,返回冪指數的結果。舉例://pow.c#include<stdlib.h>#include<math.h>#include<conio.h>voidmain(){printf("4^5=%f",pow(4.,5.));getchar();}相關函式:pow10
-
3 # Jacky喵黃
C語言中的冪指數可用Mathh中的冪函式進行比較。
-
4 # 丹丹無
extern float pow(float x, float y)
用法:#include <math.h>
功能:計算x的y次冪。
說明:x應大於零,返回冪指數的結果。
舉例:
// pow.c
#include <stdlib.h>
#include <math.h>
#include <conio.h>
void main()
{
printf("4^5=%f",pow(4.,5.));
getchar();
}
相關函式:pow10
C語言是一門通用計算機程式語言,應用廣泛。C語言的設計目標是提供一種能以簡易的方式編譯、處理低階儲存器、產生少量的機器碼以及不需要任何執行環境支援便能執行的程式語言。
extern float pow(float x, float y)
用法:#include <math.h>
功能:計算x的y次冪。
說明:x應大於零,返回冪指數的結果。
舉例:
// pow.c
#include <stdlib.h>
#include <math.h>
#include <conio.h>
void main()
{
printf("4^5=%f",pow(4.,5.));
getchar();
}