Okay so I want to write a program that adds a sale tax to an order. Now, say that the user enters %7 as the tax rate. How do I make that %7 into 0.7 or whatever so I can calculate how much the price would be after tax?
Scanner scanner = new Scanner(System.in);
System.out.println("This program will add a sales tax to a selected item.\nPlease enter the price of the item.");
double initialPrice = scanner.nextDouble();
System.out.println("You entered $" + initialPrice +" as the price of the item.\nNow enter sales tax rate.");
double tax = scanner.nextDouble();
double totalPrice = ; //??????????
System.out.println("An item which costs $" + initialPrice + " and incurs a sales tax of %" + tax + " comes out to:");
System.out.println("$" + totalPrice);