Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

18
Task/Nth/MATLAB/nth.m Normal file
View file

@ -0,0 +1,18 @@
function s = nth(n)
tens = mod(n, 100);
if tens > 9 && tens < 20
suf = 'th';
else
switch mod(n, 10)
case 1
suf = 'st';
case 2
suf = 'nd';
case 3
suf = 'rd';
otherwise
suf = 'th';
end
end
s = sprintf('%d%s', n, suf);
end