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

Solution 47231

Submitted on 21 Feb 2012 by Alfonso Nieto-Castanon

Correct

38Size
Leading solution size is 23.
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test
Code Input and Output
1
Pass
 
%%
tic
for k=1:3
wealth=@()1000000;
status_correct = 'Millionaire';
assert(isequal(reporter(wealth),status_correct))
wealth=@()999000*(1+rand/100);
status_correct = 'Likely';
assert(isequal(reporter(wealth),status_correct))
wealth=@()750000*(1+rand);
status_correct = 'Likely';
assert(isequal(reporter(wealth),status_correct))
wealth=@()600000*(1+rand);
status_correct = 'Gambler';
assert(isequal(reporter(wealth),status_correct))
end
assert(toc<2)