------ art_56422_4201053.1151265230659
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Preface- I know there is an easier way , since I'll be working into the
thousands.
Anyway, down below I'm taking a number between 10 and 49 and converting to a
Roman Numeral. I've been experimenting with 46, which should return XXXXVI
only it's returning XXXXVIIIII
For some reason this line rnm rnm-vrnm) is not calculating or not
calculating correctly, though I am doing the raw numbers in IRB and that
works fine.
Also , as a side note, SCITE is highlight (in a brownish color) from the x
in rnm num%x) to the rnm rnm-vrnm). Kind of weird, unsure what it is.
by the way, a) I maybe asking too many questions for one day b) I know there
is a simpler way to do this , but hopefully my brain will slowly adapt.
if num > 0 && num < 9
x 0
v
rn num/x)
rnm num%x)
vrnm nm/v
rn.times do
print "X"
end
vrnm.times do
print "V"
end
rnm rnm-vrnm)
rnm.times do
print "I"
end
end
------ art_56422_4201053.1151265230659--