Cody

Problem 48. Making change

Created by Cody Team in Cody Challenge

Given an amount of currency, return a vector of this form:

 [100 50 20 10 5 2 1 0.5 0.25 0.1 0.05 0.01]

Example:

 Input a = 257.68
 Output b is [2 1 0 0 1 1 0 1 0 1 1 3]

Always use bigger bills/coins if possible.

Solution Stats

36.15% Correct | 63.85% Incorrect
Last solution submitted on Dec 14, 2018

Problem Comments

Solution Comments

Recent Solvers1403

Tags

Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

MATLAB Academy

New to MATLAB?

Learn MATLAB today!