Cody

Solution 843526

Submitted on 4 Mar 2016 by Ned Gulley
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test Status Code Input and Output
1   Pass
nums = [0,1,10,25,26,52,100,260]; words = {'a','b','k','z','ba','ca','dw','ka'}; for n=1:length(nums) assert(strcmpi(words{n},dec2alpha(nums(n)))); end

mp = abcdefghij klmnopqrstuvwxyz s = a mp = abcdefghij klmnopqrstuvwxyz s = b mp = abcdefghij klmnopqrstuvwxyz s = k mp = abcdefghij klmnopqrstuvwxyz s = z mp = abcdefghij klmnopqrstuvwxyz s = ba mp = abcdefghij klmnopqrstuvwxyz s = ca mp = abcdefghij klmnopqrstuvwxyz s = dw mp = abcdefghij klmnopqrstuvwxyz s = ka

2   Pass
nums = [35664,62366]; words = {'cats','dogs'}; for n=1:length(nums) assert(strcmpi(words{n},dec2alpha(nums(n)))); end

mp = abcdefghij klmnopqrstuvwxyz s = cats mp = abcdefghij klmnopqrstuvwxyz s = dogs

3   Pass
assert(strcmpi('matlab', dec2alpha(142917893)));

mp = abcdefghij klmnopqrstuvwxyz s = matlab

Suggested Problems

More from this Author2