Created
July 11, 2012 00:52
-
-
Save EduardoLopes/3087209 to your computer and use it in GitHub Desktop.
Calcular o volume de um cilindro.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function volumeCilindro($raio, $altura) | |
{ | |
$volume = M_PI * pow($raio, 2) * $altura; | |
return round($volume, 2); | |
} | |
echo volumeCilindro(2, 10); //125.66 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment