Jump to content

Roman numerals/Encode: Difference between revisions

m
Line 3,130:
 
<syntaxhighlight lang="text">
procfunc$ 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]
Line 3,140 ⟶ 3,139:
.
.
return rom$
.
print dec2rom 1990 r$
print r$dec2rom 2008
print dec2rom 1666 r$
dec2rom 2008 r$
print r$
dec2rom 1666 r$
print r$
</syntaxhighlight>
 
2,054

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.