1. <html>
  2. <head>
  3. <title> Cercle PHP </title>
  4. <meta charset="utf-8">
  5. <?php
  6. $rayon=10;
  7. ?>
  8. <style>
  9. span.rep {
  10. color: red;
  11. }
  12. </style>
  13. </head>
  14. <body>
  15. <h1> Données dimensionnelles d'une cercle de rayon :
  16. <?php
  17. echo $rayon;
  18. ?>
  19. cm.</h1>
  20. <br>
  21. <hr>
  22. <h2>Circonférence :
  23. <span class="rep">
  24. <?php
  25. echo number_format(2*pi()*$rayon,2,","," ");
  26. ?>
  27. cm.
  28. </span></h2>
  29. <br>
  30. <h2>Surface :
  31. <span class="rep">
  32. <?php
  33. echo number_format(pi()*$rayon**2,2,","," ");
  34. ?>
  35. cm<sup>2</sup>.
  36. </span></h2>
  37. <br>
  38. </body>
  39. </html>