Data update
This commit is contained in:
parent
5af6d93694
commit
796d366b97
455 changed files with 7413 additions and 1900 deletions
|
|
@ -1,17 +1,14 @@
|
|||
proc dec2rom dec . rom$ .
|
||||
func$ dec2rom dec .
|
||||
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]
|
||||
.
|
||||
.
|
||||
return rom$
|
||||
.
|
||||
call dec2rom 1990 r$
|
||||
print r$
|
||||
call dec2rom 2008 r$
|
||||
print r$
|
||||
call dec2rom 1666 r$
|
||||
print r$
|
||||
print dec2rom 1990
|
||||
print dec2rom 2008
|
||||
print dec2rom 1666
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue