tasks a-s
This commit is contained in:
parent
47bf37c096
commit
b83f433714
12433 changed files with 156208 additions and 123 deletions
1
Task/Number-names/Inform-7/number-names-1.inf
Normal file
1
Task/Number-names/Inform-7/number-names-1.inf
Normal file
|
|
@ -0,0 +1 @@
|
|||
say 32767 in words;
|
||||
1
Task/Number-names/Inform-7/number-names-2.inf
Normal file
1
Task/Number-names/Inform-7/number-names-2.inf
Normal file
|
|
@ -0,0 +1 @@
|
|||
say 2147483647 in words;
|
||||
24
Task/Number-names/Inform-7/number-names-3.inf
Normal file
24
Task/Number-names/Inform-7/number-names-3.inf
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
u=. ;:'one two three four five six seven eight nine'
|
||||
v=. ;:'ten eleven twelve thirteen fourteen fifteen sixteen seventeen eighteen nineteen'
|
||||
t=. ;:'twenty thirty forty fifty sixty seventy eighty ninety'
|
||||
EN100=: '' ; u , v , , t ,&.>/ '';'-',&.>u
|
||||
|
||||
z=. '' ; 'thousand' ; (;:'m b tr quadr quint sext sept oct non'),&.> <'illion'
|
||||
u=. ;:'un duo tre quattuor quin sex septen octo novem'
|
||||
t=. (;:'dec vigint trigint quadragint quinquagint sexagint septuagint octogint nonagint'),&.><'illion'
|
||||
ENU=: z , (, t ,~&.>/ '';u) , <'centillion'
|
||||
|
||||
en3=: 4 : 0
|
||||
'p q'=. 0 100#:y
|
||||
(p{::EN100),((*p)#' hundred'),((p*&*q)#x),q{::EN100
|
||||
)
|
||||
|
||||
en=: 4 : 0
|
||||
d=. 1000&#.^:_1 y
|
||||
assert. (0<:y) *. ((=<.)y) *. d <:&# ENU
|
||||
c=. x&en3&.> (*d)#d
|
||||
((0=y)#'zero') , (-2+*{:d) }. ; , c,.(<' '),.(ENU{~I.&.|.*d),.<', '
|
||||
)
|
||||
|
||||
uk=: ' and '&en NB. British
|
||||
us=: ' ' &en NB. American
|
||||
Loading…
Add table
Add a link
Reference in a new issue