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.
Arithmetic operations
Slice and dice your price tag
Report a typo
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");
}
} ___
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.
Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.