Cody

# Problem 42757. Convert integer to base26 using letters

Solution 1055449

Submitted on 17 Nov 2016
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   Fail
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

Undefined function 'convalpha' for input arguments of type 'double'. Error in dec2alpha (line 6) s=convalpha(word); Error in TestPoint1 (line 4) assert(strcmpi(words{n},dec2alpha(nums(n))));

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

Undefined function 'convalpha' for input arguments of type 'double'. Error in dec2alpha (line 6) s=convalpha(word); Error in TestPoint2 (line 4) assert(strcmpi(words{n},dec2alpha(nums(n))));

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

Undefined function 'convalpha' for input arguments of type 'double'. Error in dec2alpha (line 6) s=convalpha(word); Error in TestPoint3 (line 1) assert(strcmpi('matlab', dec2alpha(142917893)));