tasks a-s
This commit is contained in:
parent
47bf37c096
commit
b83f433714
12433 changed files with 156208 additions and 123 deletions
|
|
@ -0,0 +1,16 @@
|
|||
print 1666+" = "+convert$(1666)
|
||||
print 2008+" = "+convert$(2008)
|
||||
print 1001+" = "+convert$(1001)
|
||||
print 1999+" = "+convert$(1999)
|
||||
|
||||
function convert$(value)
|
||||
convert$=""
|
||||
arabic = {1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1 }
|
||||
roman$ = {"M", "CM", "D","CD", "C","XC","L","XL","X","IX","V","IV","I"}
|
||||
for i = 0 to 12
|
||||
while value >= arabic[i]
|
||||
convert$ += roman$[i]
|
||||
value = value - arabic[i]
|
||||
end while
|
||||
next i
|
||||
end function
|
||||
Loading…
Add table
Add a link
Reference in a new issue