-
-
Save parzibyte/5f8068438c31af00b2f77ca30d931985 to your computer and use it in GitHub Desktop.
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 | |
// https://parzibyte.me/blog | |
define("PI", 3.1416); | |
# Leer el diámetro desde el formulario que fue enviado a este script | |
$diametro = $_POST["diametro"]; | |
/* | |
Realizar cálculos | |
*/ | |
$circunferencia = PI * $diametro; | |
$radio = $diametro / 2; | |
/* | |
Imprimir | |
*/ | |
echo "La circunferencia del círculo es: " . $circunferencia . " <br>"; | |
echo "El radio del círculo es " . $radio . " <br>"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment