PHP Online Compiler
Example: PHP Program to Calculate the Power of a Number using pow() Function
C
C++
C#
Java
Python
PHP
main.php
STDIN
Run
<?php // PHP Program to Calculate the Power of a Number using pow() Function $b = 8; $x = 3; $r = 1; // b - To store base number // x - To store exponent number // r - To store result value $r = pow($b, $x); echo "The calculation of the power of N number is {$b}^{$x} = {$r}"; ?>
Output
Clear
ADVERTISEMENTS