Roman Numbers by rotary-o

for(i<-0 to'\xcf\xa8';s="IVXLCDM")println{def f(i:Int,j:Int)={val t=""+s(j)
t*(i%5/4)+(""+s(j+(i+1)/5))*((i+3)/7)+t*(i%5%4)}
f(i/100,4)+f(i/10%10,2)+f(i%10,0)}

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

To protect the system from spam, please input your favorite sport (hint: I believe its name must start with 'g', case insensitive)

download

return to the top page