import java.util.*;
import java.lang.*;
import java.io.*;

// The main method must be in a class named "Main".
class Main {
    public static void main(String[] args) {
        Scanner teclado = new Scanner(System.in);

        System.out.println("Calculadora de precios más impuesto");
        System.out.print("\nDigite el precio del producto: ");
        double precio = teclado.nextDouble();

        System.out.print("\nDigite la cantidad de productos que tiene: ");
        int cantidad = teclado.nextInt();

        teclado.nextLine(); // limpia el salto de línea
        System.out.print("\nDigite su nombre: ");
        String nombre = teclado.nextLine();

        double impuesto = 0.13;
        double total = precio * cantidad;
        double totalImp = total * impuesto;

        System.out.println("\n\nGracias, " + nombre + ", el total de los productos sería:\n--" + (total + totalImp));
    }
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: