- <html>
- <head>
- <title> Cercle PHP </title>
- <meta charset="utf-8">
- <?php
- $rayon=10;
- ?>
- <style>
- span.rep {
- color: red;
- }
- </style>
- </head>
- <body>
- <h1> Données dimensionnelles d'une cercle de rayon :
- <?php
- echo $rayon;
- ?>
- cm.</h1>
- <br>
- <hr>
- <h2>Circonférence :
- <span class="rep">
- <?php
- echo number_format(2*pi()*$rayon,2,","," ");
- ?>
- cm.
- </span></h2>
- <br>
- <h2>Surface :
- <span class="rep">
- <?php
- echo number_format(pi()*$rayon**2,2,","," ");
- ?>
- cm<sup>2</sup>.
- </span></h2>
- <br>
- </body>
- </html>
-
-
-