Interesting problem. I guess it´s rarely applied.
great! learning the existence of arrayfun
Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
%%
a = 1;
b = 2;
out = sumDigits(a);
assert(isequal(out, b))
|
2 | Pass |
%%
a = 10;
b = 7;
out = sumDigits(a);
assert(isequal(out, b))
|
3 | Pass |
%%
a = 16;
b = 25;
out = sumDigits(a);
assert(isequal(out, b))
|
Return the largest number that is adjacent to a zero
3750 Solvers
Basic electricity in a dry situation
488 Solvers
501 Solvers
380 Solvers
600 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!