Cody

Solution 1156809

Submitted on 8 Apr 2017 by H M Dipu Kabir
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

x = 0 x = 0 x = 0 x = 0 x = 26 x = 1 x = 52 x = 2 x = 78 x = 3 x = 260 x = 10

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

x = 35646 x = 1371 x = 52 x = 2 x = 62348 x = 2398 x = 92 x = 3

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

x = 142917892 x = 5496842 x = 211417 x = 8131 x = 312 x = 12

Suggested Problems

More from this Author2