Exerpad
🔥 0
0 XP
Exercise 11 · Chapter: Linear ProgramsOptional+50 XP

Coin Quest: The Coin Shop

🪙 The shop is open! A coin pack costs 4 dollars, and you're buying 3 packs with 20 dollars in your pocket.

  1. Create packs with 3
  2. Compute price as 4 * packs
  3. Compute money as 20 - price
  4. Print the receipt with a template literal: You bought 3 packs for 12 dollars
  5. Print money on its own line
Expected output
You bought 3 packs for 12 dollars
8
Need a hint?
3 available · costs 5 XP each
javascript

Output
Run your code to see the output here.