// Name penis

//


import java.util.*;
import static java.lang.System.*;


public class Shop2023 {

    public static void main(String args[]) {
        Scanner reader  = new Scanner ( System.in );

        double TAX = 0.0825;

        double cash = 20.00;
        double milkCost = 0.0;
        double eggsCost = 0.0;
        double baconCost = 0.0;
        double soapCost = 0.0;     // taxable 8.25%

        double milkTax = 0.0;
        double eggTax = 0.0;
        double baconTax = 0.0;
        double soapTax = 0.0;

        double subTotal = 0.0;
        double change = 0.0;
        double totalTaxes = 0.0;

        System.out.println("  Enter  the cost of the milk:        * ");
        milkCost= reader.nextDouble();

        System.out.println("Enter the cost of the eggs: ");
        eggsCost = reader.nextDouble();

        System.out.println("Enter the cost of the bacon: ");
        baconCost = reader.nextDouble();

        System.out.println("Enter the cost of the soap: ");
        soapCost = reader.nextDouble();

        // CALCULATIONS
        milkTax = milkCost * TAX;
        eggTax = eggsCost * TAX;
        baconTax = baconCost * TAX;
        soapTax = soapCost * TAX;

        // total
        totalTaxes = milkTax + eggTax + baconTax + soapTax;

        subTotal = milkCost + eggsCost + baconCost + soapCost;

        change = cash - (subTotal * totalTaxes);

        System.out.println("Milk cost  $" + milkCost );
        System.out.println("Eggs cost  $" + eggsCost );
        System.out.println("Bacon cost $" + baconCost);
        System.out.println("Soap cost $" + soapCost);

        System.out.println("    Subtotal : $" + subTotal);
        System.out.println("       Taxes : $" + totalTaxes);


        System.out.printf("My change :%10.2f\n", change);
    }
}

Embed on website

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