From 028cd99930fb482213342931cf533a777f09c53f Mon Sep 17 00:00:00 2001 From: Mario Ruano Date: Tue, 31 Oct 2023 19:33:38 +0100 Subject: [PATCH] Reto #43 - PHP --- .../php/mrf1989.php" | 54 +++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 "Retos/Reto #43 - SIMULADOR DE CLIMA [F\303\241cil]/php/mrf1989.php" diff --git "a/Retos/Reto #43 - SIMULADOR DE CLIMA [F\303\241cil]/php/mrf1989.php" "b/Retos/Reto #43 - SIMULADOR DE CLIMA [F\303\241cil]/php/mrf1989.php" new file mode 100644 index 0000000000..9d475220cb --- /dev/null +++ "b/Retos/Reto #43 - SIMULADOR DE CLIMA [F\303\241cil]/php/mrf1989.php" @@ -0,0 +1,54 @@ + 25) { + $p_lluvia += 20; + if ($p_lluvia > 100) { + $p_lluvia = 100; + $tmp -= 1; + } + } else if ($tmp < 5) { + $p_lluvia -= 20; + if ($p_lluvia < 0) { + $p_lluvia = 0; + } + } + } + + echo "RESUMEN:\n"; + echo "- Días lluviosos: {$dias_lluviosos}.\n"; + echo "Temperatura máxima: " . max($tmp_diarias) . " grados.\n"; + echo "Tempratura mínima: " . min($tmp_diarias) . " grados.\n"; +} + +predecir_clima(24, 24, 20);