import java.util.Scanner; public class ChangeCalculatorProgram3 { public static void main(String[] args) { double price, tax, total, payment, change; System.out.println("Enter product price:"); price = new Scanner(System.in).nextFloat(); System.out.println("Enter payment amount:"); payment = new Scanner(System.in).nextFloat(); tax = price * 0.13; total = price + tax; change = payment - total; System.out.println(String.format("%15s%10.2f","Product Price", price)); System.out.println(String.format("%15s%10.2f","Tax", tax)); System.out.println("-------------------------"); System.out.println(String.format("%15s%10.2f","Subtotal", total)); System.out.println(String.format("%15s%10.2f","Amount Tendered", payment)); System.out.println("========================="); System.out.println(String.format("%15s%10.2f","Change Due", change)); } }