+ 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(); } }
1 Antwort
+ 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.