Question: Java I need help with the following code. Im having trouble with how to code to accept input from the user and with some of

Java

I need help with the following code. Im having trouble with how to code to accept input from the user and with some of the final calculations. Any help would be appreciated.

* Purpose: To accept input from user and calculate the amount of discount, amount of sales tax *set at 6%* and tally the final total of the sale.

public class SaleDis { public static void main (String [] args) { double saleAmount = 0; double secondNumber = 0.06; double thirdNumber = 0.35778; System.out.printf("Please enter the sales price: $" + saleAmount); System.out.printf("Please enter the discount percentage. *be sure to enter it in the for of a decimal*: ", discountPercent); System.out.println("****Sale Discount Calculation****"); System.out.println("Original Sale Amount: $" + saleAmount); System.out.printf("Discount Percentage: ", discountPercent); System.out.printf("Amount of the discount: ", discountAmount); System.out.printf("Sale amount after discount: ", postDiscountAmount); System.out.printf("Amount of sales tax: ", salesTax); System.out.printf("Final sales price: ", finalAmount); } }

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!