Roman numerals/Encode: Difference between revisions

m (→‎{{header|F_Sharp|F#}}: fix in error msg)
Line 3,064:
return roman(subtractor) + roman(num + subtractor) if num >= cutPoint - subtractor and num < cutPoint
end
end</lang>
 
[1990, 2008, 1666].each do |i|
puts "%4d => %s" % [i, roman(i)]
end</lang>
 
{{out}}
<pre>
1990 => MCMXC
2008 => MMVIII
1666 => MDCLXVI
</pre>
 
=={{header|Run BASIC}}==
Anonymous user