Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Melinda
- //11.10.15
- //DiscountDeterminerHw
- import java.util.*;
- import java.text.*;
- public class DiscountDeterminerHw
- {
- public static void main(String[] args)
- {
- Scanner input = new Scanner(System.in);
- DecimalFormat df = new DecimalFormat("$###,###.00");
- System.out.print("Enter the original price of the item: ");
- double price = input.nextDouble();
- System.out.println("Enter the discount percentage: ");
- double discount = input.nextDouble();
- double disPrice = price * (discount* .010);
- double tax = .08875;
- double finalPrice = (price-disPrice * tax);
- System.out.println("That will be " + df.format(finalPrice));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement