Cody

# Problem 63. Encode Roman Numerals

Solution 161792

Submitted on 14 Nov 2012 by Claudio Gelmi
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
%% x = 1990; y_correct = 'MCMXC'; assert(isequal(dec2rom(x),y_correct))

2   Pass
%% x = 2008; y_correct = 'MMVIII'; assert(isequal(dec2rom(x),y_correct))

3   Pass
%% x = 1666; y_correct = 'MDCLXVI'; assert(isequal(dec2rom(x),y_correct))

4   Pass
%% x = 49; y_correct = 'XLIX'; assert(isequal(dec2rom(x),y_correct))

5   Pass
%% x = 45; y_correct = 'XLV'; assert(isequal(dec2rom(x),y_correct))

6   Pass
%% x = 0; y_correct = ''; assert(isempty(dec2rom(x)))

[Warning: Inputs must be character arrays or cell arrays of strings.] [> In dec2rom at 14 In verifyCode>evaluateCode at 189 In verifyCode at 40 In fevalJSON at 14] [Warning: Inputs must be character arrays or cell arrays of strings.] [> In dec2rom at 15 In verifyCode>evaluateCode at 189 In verifyCode at 40 In fevalJSON at 14] [Warning: Inputs must be character arrays or cell arrays of strings.] [> In dec2rom at 16 In verifyCode>evaluateCode at 189 In verifyCode at 40 In fevalJSON at 14] [Warning: Inputs must be character arrays or cell arrays of strings.] [> In dec2rom at 17 In verifyCode>evaluateCode at 189 In verifyCode at 40 In fevalJSON at 14]