Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- val expenseInaDay = (("Metro", 4),
- ("Pizza", 10),
- ("Groceries", 20),
- ("Coffee Break at work", 3),
- ("New iPhone", 600)) // the task here is to define a list of expenses – so the challenge is to figure out how to represent individual expenses and then unite them in one list.
- val m1 = expenseInaDay._1
- val m2 = expenseInaDay._2
- val m3 = expenseInaDay._3
- val m4 = expenseInaDay._4
- val m5 = expenseInaDay._5
- println(m1) //println(s"Cost for $m1$$")
- println(m2)
- println(m3)
- println(m4)
- println (m5)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement