Question d’entretien chez Capital One

How would you program a coin calculator?