From 7d1787561d51c81c5eb2c8d18b59955dbfd7b9f6 Mon Sep 17 00:00:00 2001 From: T-Royale <141929186+T-Royale@users.noreply.github.com> Date: Thu, 15 Oct 2026 18:01:09 +0200 Subject: [PATCH] Intentar arreglar radares de tramo --- src/P112_RadaresDeTramo.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/P112_RadaresDeTramo.java b/src/P112_RadaresDeTramo.java index 3f8d477..6257fff 100644 --- a/src/P112_RadaresDeTramo.java +++ b/src/P112_RadaresDeTramo.java @@ -26,7 +26,7 @@ public class P112_RadaresDeTramo { if (velocidad > velPermitida){ // indicará "MULTA" si se superó esa velocidad en menos de un 20% de la velocidad máxima permitida, // y "PUNTOS" si la velocidad fue superada en un 20% o más de esa velocidad; - double rangoMulta = velPermitida * 20 / 100; // Rango que decide si te multan o te quitan puntos + double rangoMulta = velPermitida * 0.20; // Rango que decide si te multan o te quitan puntos if(velocidad < velPermitida + rangoMulta){ System.out.println("MULTA"); } else { @@ -36,5 +36,6 @@ public class P112_RadaresDeTramo { System.out.println("OK"); } } + sc.close(); } -} \ No newline at end of file +}