Subject: PHP

Discount Calculation

Define a constant DISCOUNT_RATE as 0.10. Create a variable $originalPrice and calculate the discounted price using the constant. Display both the original and discounted price.

Learning Outcome: Learn to use constants for calculations in applications.

Select file or drag and drop

PNG, JPG, SVG

Preview