• rooroo@feddit.org
    link
    fedilink
    arrow-up
    21
    arrow-down
    1
    ·
    19 hours ago

    It also works the other way round: wanna convert Arabic n to Roman? Just write n times ‘I’ and revert these replacement in inverse order.

    • lugal@lemmy.dbzer0.com
      link
      fedilink
      arrow-up
      6
      ·
      18 hours ago

      I don’t know what happens when the substring overlaps. Like for the number 6, will it replace the first 5 I’s with V and end up correctly with VI or the last ones and come to IV? I would guess the former and maybe you know but I never thought about it before