Php program to print the pie value

A Php program to print the pie value. In this program we can print the value of pi using the function pie. Because Pi is an irrational number, it cannot be stated in the form of p/q. However, we proclaim Pi as 22/7 because to find the area or circumference of a circle, we only need the first three digits, which are 3.14, and the value of 22/7 is 3.14285, thus we declare pi as 22/7.

<?php
echo(pi());
?>

 

Output:

3.1415926535898