Skip to content

Commit

Permalink
Add travel cost example
Browse files Browse the repository at this point in the history
  • Loading branch information
sharkdp authored and David Peter committed Sep 6, 2024
1 parent 21c5b67 commit b87cbf0
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions examples/travel_cost.nbt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
@aliases(nights)
unit night

let flights = $ 600

let accomodation = 120 $ per night
let food = 60 $ per night
let spending_money = 50 $ per night

let total = flights + 10 nights × (accomodation + food + spending_money)

assert_eq(total, $ 2900)

0 comments on commit b87cbf0

Please sign in to comment.