Cody

Solution 2328973

Submitted on 22 May 2020
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
m = '1B'; n='10'; y_correct = '2B'; assert(isequal(hex_add(m,n),y_correct))

Undefined function 'dec2hec' for input arguments of type 'double'. Error in hex_add (line 4) y=dec2hec(m_dec+n_dec); Error in Test1 (line 4) assert(isequal(hex_add(m,n),y_correct))

2   Fail
m = '1B0'; n='10'; y_correct = '1C0'; assert(isequal(hex_add(m,n),y_correct))

Undefined function 'dec2hec' for input arguments of type 'double'. Error in hex_add (line 4) y=dec2hec(m_dec+n_dec); Error in Test2 (line 4) assert(isequal(hex_add(m,n),y_correct))

3   Fail
m = '1B0'; n='F'; y_correct = '1BF'; assert(isequal(hex_add(m,n),y_correct))

Undefined function 'dec2hec' for input arguments of type 'double'. Error in hex_add (line 4) y=dec2hec(m_dec+n_dec); Error in Test3 (line 4) assert(isequal(hex_add(m,n),y_correct))

4   Fail
m = '1B0'; n='F'; y_correct = '1BF'; assert(isequal(hex_add(m,n),y_correct))

Undefined function 'dec2hec' for input arguments of type 'double'. Error in hex_add (line 4) y=dec2hec(m_dec+n_dec); Error in Test4 (line 4) assert(isequal(hex_add(m,n),y_correct))

5   Fail
m = '25'; n='25'; y_correct = '4A'; assert(isequal(hex_add(m,n),y_correct))

Undefined function 'dec2hec' for input arguments of type 'double'. Error in hex_add (line 4) y=dec2hec(m_dec+n_dec); Error in Test5 (line 4) assert(isequal(hex_add(m,n),y_correct))