best solution so far! the way you handle the complexity of multiple conditions, is rather instructive. it perfectly demonstrate how to command the usage of function and command it in detail.
Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
inp = '1FUNDOG4YOU';
out_correct = 13863644968;
assert(isequal(dial(inp),out_correct))
|
2 | Pass |
inp = '1 (FUN) DOG-4-YOU #2';
out_correct = 0;
assert(isequal(dial(inp),out_correct))
|
1421 Solvers
220 Solvers
Back to basics 9 - Indexed References
392 Solvers
Create the following sequence : 0 1 1 4 9 25 64 169 ...
63 Solvers
186 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!