Cody

Problem 371. Decimal Comparison

Solution 188283

Submitted on 9 Jan 2013
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
%% assert(numCmp('12.3456',12.3456))

```Error: Undefined function 'str2dobule' for input arguments of type 'char'. ```

2   Fail
%% assert(numCmp('12.3456',12.3456789))

```Error: Undefined function 'str2dobule' for input arguments of type 'char'. ```

3   Fail
%% assert(~numCmp('12.3456',12.345))

```Error: Undefined function 'str2dobule' for input arguments of type 'char'. ```

4   Fail
%% assert(~numCmp('12.34567890',12.3456))

```Error: Undefined function 'str2dobule' for input arguments of type 'char'. ```

5   Fail
%% assert(numCmp('12e6',12e6))

```Error: Undefined function 'str2dobule' for input arguments of type 'char'. ```

6   Fail
%% assert(~numCmp('54',100))

```Error: Undefined function 'str2dobule' for input arguments of type 'char'. ```