Cody

Solution 2643490

Submitted on 2 Jul 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
x = 100; y_correct = 0; assert(isequal(last_digit(x),y_correct))

x1 = '100' x2 = 1×1 cell array {'100'}

Assertion failed.

2   Fail
x = 103; y_correct = 3; assert(isequal(last_digit(x),y_correct))

x1 = '103' x2 = 1×1 cell array {'103'}

Assertion failed.

3   Fail
x = 55958; y_correct = 8; assert(isequal(last_digit(x),y_correct))

x1 = '55958' x2 = 1×1 cell array {'55958'}

Assertion failed.

4   Fail
x = 6165451646465; y_correct = 5; assert(isequal(last_digit(x),y_correct))

x1 = '6165451646465' x2 = 1×1 cell array {'6165451646465'}

Assertion failed.