Cody

# Problem 933. Ordinal numbers

Solution 747926

Submitted on 28 Sep 2015 by Peng Liu
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
%% assert(isequal(ord(1),'1st'))

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] ans = 0

2   Pass
%% assert(isequal(ord(2),'2nd'))

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] ans = 0

3   Pass
%% assert(isequal(ord(3),'3rd'))

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] ans = 0

4   Pass
%% assert(isequal(ord(4),'4th'))

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] ans = 0

5   Pass
%% assert(isequal(ord(5),'5th'))

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] ans = 0

6   Pass
%% assert(isequal(ord(10),'10th'))

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] ans = 0

7   Pass
%% assert(isequal(ord(11),'11th'))

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] ans = 0

8   Pass
%% assert(isequal(ord(12),'12th'))

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] ans = 0

9   Pass
%% assert(isequal(ord(13),'13th'))

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] ans = 0

10   Pass
%% assert(isequal(ord(14),'14th'))

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] ans = 0

11   Pass
%% assert(isequal(ord(15),'15th'))

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] ans = 0

12   Pass
%% assert(isequal(ord(82),'82nd'))

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] ans = 0

13   Pass
%% assert(isequal(ord(126),'126th'))

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] ans = 0

14   Pass
%% assert(isequal(ord(911),'911th'))

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] ans = 0

15   Pass
%% assert(isequal(ord(2012),'2012th'))

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] ans = 0

16   Pass
%% assert(isequal(ord(4077),'4077th'))

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] ans = 0

17   Pass
%% assert(isequal(ord(0),'0th'))

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] ans = 0

18   Pass
%% assert(isequal(ord(-101),'-101st'))

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] ans = 0

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!