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.

【初心者】PHPで累乗の計算がしたい

Posted at

累乗とは…

おそらくこれに関しては書き残しておかなくても問題ないが、もしかしたら忘れてしまうことがあるかもしれない。
累乗とは何の何乗みたいな…説明が難しい。(2の3乗が8とか、5の2乗が25のような)

これをPHPで計算したい時の表記の仕方

$n ** $m; // $nの$m乗

掛けるの記号を二つ並べることによって、累乗の計算ができるようになった。
四則演算に加えて覚えておきたい。絶対どこかで使うはず。

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?