Problem 9. Who Has the Most Change?

Created by Cody Team in Community

You have a matrix for which each row is a person and the columns represent the number of quarters, nickels, dimes, and pennies that person has (in that order). What is the row index of the person with the most money?

Note for those unfamiliar with American coins: quarter = $0.25, dime = $0.10, nickel = $0.05, penny = $0.01.


 Input  a = [1 0 0 0; 0 1 0 0]
 Output b = 1

since the first person will have $0.25 and the second person will have only $0.05.

Solution Stats

34.24% Correct | 65.76% Incorrect
Last solution submitted on Mar 20, 2019

Problem Comments

Solution Comments

Recent Solvers5066

Suggested Problems

More from this Author95

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!