Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,31 @@
|
|||
dim arabic( 12)
|
||||
for i =0 to 12
|
||||
read k
|
||||
arabic( i) =k
|
||||
next i
|
||||
data 1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1
|
||||
|
||||
dim roman$( 12)
|
||||
for i =0 to 12
|
||||
read k$
|
||||
roman$( i) =k$
|
||||
next i
|
||||
data "M", "CM", "D", "CD", "C", "XC", "L", "XL", "X", "IX", "V", "IV", "I"
|
||||
|
||||
print 2009, toRoman$( 2009)
|
||||
print 1666, toRoman$( 1666)
|
||||
print 3888, toRoman$( 3888)
|
||||
|
||||
end
|
||||
|
||||
function toRoman$( value)
|
||||
i =0
|
||||
result$ =""
|
||||
for i = 0 to 12
|
||||
while value >=arabic( i)
|
||||
result$ = result$ + roman$( i)
|
||||
value = value - arabic( i)
|
||||
wend
|
||||
next i
|
||||
toRoman$ =result$
|
||||
end function
|
||||
Loading…
Add table
Add a link
Reference in a new issue