Skip to main content

Practice · 3 of 4

Format a price banner

CHALLENGE
Difficulty: beginner+25 XP

A shop banner must be printed with formatted numbers. Inside main, print exactly: `` === WEEKLY DEAL === Price: 19.99 USD === END === ` Use String.formatted (or printf) so the price comes from a double price = 19.991;` variable and is rounded to 2 decimal places.

Back to lesson: Practice: Practice: First Programs