Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,17 @@
|
|||
proc dec2rom dec . rom$ .
|
||||
values[] = [ 1000 900 500 400 100 90 50 40 10 9 5 4 1 ]
|
||||
symbol$[] = [ "M" "CM" "D" "CD" "C" "XC" "L" "XL" "X" "IX" "V" "IV" "I" ]
|
||||
rom$ = ""
|
||||
for i = 1 to len values[]
|
||||
while dec >= values[i]
|
||||
rom$ &= symbol$[i]
|
||||
dec -= values[i]
|
||||
.
|
||||
.
|
||||
.
|
||||
call dec2rom 1990 r$
|
||||
print r$
|
||||
call dec2rom 2008 r$
|
||||
print r$
|
||||
call dec2rom 1666 r$
|
||||
print r$
|
||||
Loading…
Add table
Add a link
Reference in a new issue