Free Coffee Cups

Published by Nomore in

For each of the 6 coffee cups I buy, I get a 7th cup free. In total, I get 7 cups. Create a function that takes n cups bought and return the total number of cups I would get.

Examples

TotalCups(6) ➞ 7

TotalCups(12) ➞ 14

TotalCups(213) ➞ 248

Notes

  • Number of cups I bought + number of cups I got for free.
  • Only valid inputs will be given.
Watch a quick demo on how Edabit works.