N'th: Difference between revisions
→{{header|UNIX Shell}}: simplify with ternary op
(→{{header|UNIX Shell}}: Support negative numbers) |
(→{{header|UNIX Shell}}: simplify with ternary op) |
||
Line 3,313:
case $(( n % 100 )) in
11|12|13) i=0;;
*) (( i
esac
printf '%d%s\n' "$n" "${ordinals[i]}"
|