Pregunta de entrevista de Capital One

How would you program a coin calculator?