+ 1

why is giving error

import java.util.Scanner; public class CalculadoraPropinas { public static void main(String[] args) { Scanner sc = new Scanner(System.in); System.out.print("Ingrese el importe de la factura: "); double factura = sc.nextDouble(); // CĂĄlculo del 15%: (factura * 15) / 100 double propina = (factura * 15) / 100; System.out.printf("La propina es: %.2f%n", propina); sc.close(); } }

18th Aug 2025, 4:26 PM
Unknown Coder
Unknown Coder - avatar
1 Answer
+ 3
Unknown Coder , please complete your post with some more details: > what input value did you use? > is it a programming error (program stops running with an error message), or is it a logical issue (wrong result, no result,...)? > just mention an input sample value and what output do you expect to get.
18th Aug 2025, 5:31 PM
Lothar
Lothar - avatar