Created
May 11, 2013 17:14
-
-
Save aeg/5560649 to your computer and use it in GitHub Desktop.
累乗を計算する
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Case #1 | |
// 2乗を計算する | |
// 5^2 = 25 | |
// 引数も結果も Double | |
assert Math.pow(5, 2) == 25 | |
// Case #2 | |
// 累乗(N の M 乗)を計算する | |
// 2^10 = 1024 | |
assert Math.pow(2, 10) == 1024 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment