0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

冪乗(Exponentiation)

Last updated at Posted at 2021-05-13

冪乗(exponentiation) は数学演算の一種です。

b^n

として表記され、

  • b = 底(base)
  • n = 指数(exponent)

を意味し、b の n 乗 と呼ばれます。

#include <math.h>
#include <stdio.h>

int main(void) {
  double b, n, r;

  b = 2.0;
  n = 3.0;
  p = pow(b, n);

  printf("%lf to the power of %lf is %lf\n", b, n, p);
}
出力
2.000000 to the power of 3.000000 is 8.000000
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?