Advertisement
LePetitGlacon

PHP FICHE 2 liquide réponse

Feb 3rd, 2020
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.10 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4.     <meta charset="UTF-8">
  5.     <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6.     <meta http-equiv="X-UA-Compatible" content="ie=edge">
  7.     <title>Document</title>
  8.     <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
  9. </head>
  10. <body>
  11.     <div class="container">
  12.     <h1 class="allign-middle">Health Potion</h1>
  13.         <?php
  14.  
  15.         $nombreVerre =  $_POST["nombreVerre"];
  16.         $nombrePersonne =  $_POST["nombrePersonne"];
  17.         $verre = 15;
  18.  
  19.         $contenanceTotale = $nombreVerre * $nombrePersonne * $verre;
  20.         $cTL = $contenanceTotale / 1000;
  21.  
  22.         $hibi = round($contenanceTotale * 1/11,2);
  23.         $chai = round($contenanceTotale * 2/11,2);
  24.         $ananas = round($contenanceTotale * 8/11,2);
  25.  
  26.         echo "Il vous faudra ". $hibi." cL d'hibiscuss, ".$chai. " cL de thé Chai et ".$ananas. " cL d'ananas"
  27.         ?>
  28.     </div>
  29.    
  30. </body>
  31. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement