Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- echo "<!DOCTYPE html>
- <html>
- <head>
- <meta charset='utf-8' />
- <title>Quanto gastou com cigarro?</title>
- </head>
- <body>";
- $idin = $_POST["idade_inicial"];
- $idat = $_POST["idade_atual"];
- $quant = $_POST["cigarros_dia"];
- $maco = $quant / 20;
- $pre = $_POST["preco_maco"];
- $dif = $idat - $idin;
- print "<h3>Vocรช jรก gastou R$".number_format($dif*365*$maco*$pre, 2, ",", ".")." com cigarros em toda a sua vida.</h3>
- </body></html>";
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement