Home  >  Q&A  >  body text

Pi display problem

Could you please tell me where is the error in the code? dw keeps showing the second and third errors.

<?php

echo' 3 ways to write pi: <p>';

echo'The first way: pi()='.pi ().'<p>';

echo'The second type: 3.14159265359='.3.14159265359.'';

echo'The third type: 314159265359E-11='.314159265359E -11.'<p>';

?>


大帅大帅1974 days ago940

reply all(1)I'll reply

  • 云媒

    云媒2019-11-19 20:28:43

    Three ways to write pi: 3.14159265359E-11 =3.14159265359
    π = 3.14159265359
    pi() = 3.14159265359


    <?php
    $No = "3.14159265359";
    echo 'Three ways to write pi:';
    echo "3.14159265359E-11 =".$No."<br>";
    echo " π = ".$No."<br>";
    echo "pi() = ".$No."<br>";
    ?>



    reply
    0
  • Cancelreply