Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Problem 933. Ordinal numbers

Created by Tim

Given an integer n, return the corresponding ordinal number as a character string. For example,

   ord(1)='1st'
   ord(2)='2nd'
   ord(3)='3rd'
   ord(4)='4th'

This is the dictionary definition of ordinal number, as opposed to the mathematical definition.

Problem Group

Solution Statistics

33 correct solutions 53 incorrect solutions
Last solution submitted on Jul 14, 2014