Cody

Solution 1541511

Submitted on 27 May 2018 by J. S. Kowontan
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
for i = 1:100 a = counterfun; validatestring(char(a), {char(i)}) assert(isequal(a,i)) end

x = 1 ans = '' x = 2 ans = '' x = 3 ans = '' x = 4 ans = '' x = 5 ans = '' x = 6 ans = '' x = 7 ans = '' x = 8 ans = '' x = 9 ans = ' ' x = 10 ans = ' ' x = 11 ans = ' ' x = 12 ans = ' ' x = 13 ans = ' ' x = 14 ans = '' x = 15 ans = '' x = 16 ans = '' x = 17 ans = '' x = 18 ans = '' x = 19 ans = '' x = 20 ans = '' x = 21 ans = '' x = 22 ans = '' x = 23 ans = '' x = 24 ans = '' x = 25 ans = '' x = 26 ans = '' x = 27 ans = '' x = 28 ans = '' x = 29 ans = '' x = 30 ans = '' x = 31 ans = '' x = 32 ans = ' ' x = 33 ans = '!' x = 34 ans = '"' x = 35 ans = '#' x = 36 ans = '$' x = 37 ans = '%' x = 38 ans = '&' x = 39 ans = ''' x = 40 ans = '(' x = 41 ans = ')' x = 42 ans = '*' x = 43 ans = '+' x = 44 ans = ',' x = 45 ans = '-' x = 46 ans = '.' x = 47 ans = '/' x = 48 ans = '0' x = 49 ans = '1' x = 50 ans = '2' x = 51 ans = '3' x = 52 ans = '4' x = 53 ans = '5' x = 54 ans = '6' x = 55 ans = '7' x = 56 ans = '8' x = 57 ans = '9' x = 58 ans = ':' x = 59 ans = ';' x = 60 ans = '<' x = 61 ans = '=' x = 62 ans = '>' x = 63 ans = '?' x = 64 ans = '@' x = 65 ans = 'A' x = 66 ans = 'B' x = 67 ans = 'C' x = 68 ans = 'D' x = 69 ans = 'E' x = 70 ans = 'F' x = 71 ans = 'G' x = 72 ans = 'H' x = 73 ans = 'I' x = 74 ans = 'J' x = 75 ans = 'K' x = 76 ans = 'L' x = 77 ans = 'M' x = 78 ans = 'N' x = 79 ans = 'O' x = 80 ans = 'P' x = 81 ans = 'Q' x = 82 ans = 'R' x = 83 ans = 'S' x = 84 ans = 'T' x = 85 ans = 'U' x = 86 ans = 'V' x = 87 ans = 'W' x = 88 ans = 'X' x = 89 ans = 'Y' x = 90 ans = 'Z' x = 91 ans = '[' x = 92 ans = '\' x = 93 ans = ']' x = 94 ans = '^' x = 95 ans = '_' x = 96 ans = '`' x = 97 ans = 'a' x = 98 ans = 'b' x = 99 ans = 'c' x = 100 ans = 'd'