C++ converting base 10 to Roman numerals

  • Thread starter Thread starter Math Is Hard
  • Start date Start date
  • Tags Tags
    Base C++
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
60 replies · 46K views
If you want to count more than 3999, you would use parentheses around letters as explained at http://mathworld.wolfram.com/RomanNumerals.html. You wouldn't write MMMM. 4000 would be written M(V)

Edit: Or you could add a vinculum by using 2 lines of output and an underscore.

If for some reason you want to use more than 3 M's, you can just add more M's at the end of string s.

Yes, that's how the conditional statement works.
 
Last edited: