r/programbattles • • Nov 19 '15

Any language Roman Numeral Incrementer Function

give a valid roman numeral your program should return the roman numeral immediately after without converting the numeral to an integer (or float).

bonus points if you can also write a function that adds two numerals together.

8 Upvotes

11 comments sorted by

View all comments

Show parent comment

1

u/brianmcn Nov 19 '15

I presume he means something like

if rnum.EndsWith("VIII") then
    rnum.Substring(rnum.Length-4,4) <- "IX"

where you iterate over lots of string transforms?