๐ WAYPOINT LESSON
Checkpoint โ Types
โญ beginnerโณ 18 min read๐ Lesson 9 of 85
Money math and exact formatting, from a blank file.
Checkpoint: the receipt, typed
Task: implement static decimal Total(decimal price, int count, decimal taxRate) returning the after-tax total as a decimal: price * count then apply tax by multiplying by (1 + taxRate). Then implement static string Receipt(decimal total) returning $ + total formatted to exactly 2 decimals (e.g. $59.97).