Task by Task · practice fixture

Check a small pricing calculator

This fictional exercise uses a fixed unit price of £12. Quantity must be a whole number from 0 to 1,000; discount a whole percentage from 0 to 20.

Practice total —

Enter both inputs to calculate.

Rule and scope

Quantity × £12 × (1 − discount ÷ 100). Tax, delivery and other charges are excluded. A blank is missing, not zero. This page makes no order, saves no input and uses no external service.

Try 3 items at 10% (£32.40), 3 at 20% (£28.80), and 0 at 10% (£0.00). Then clear an input or enter 21%: the previous total should disappear.

Reference fixture for the Codex business-calculator lesson. Use the article's source and checks when building your own version.