Slice and dice your price tag

Report a typo

Calculate the final price of an item after applying a 20% discount. Fill the blanks in the code to determine the discounted price and display the result.

Fill in the gaps with the relevant elements
public class DiscountCalculator {
    public static void main(String[] args) {
           .0;
        double  = 20.0;
        double  = originalPrice  (discountPercentage  100);
        double  = originalPrice  discountAmount;
        ("" + finalPrice + "\n");
    }
}
Final price: $-doubleSystem.discountPercentageprintlndiscountAmount100=originalPrice*finalPriceout./
___

Create a free account to access the full topic