Converting Regular numbers to Roman Numerals

C

Chris R. Timmons

How do you write regular numbers eg 1 23 475896 in roman
numerals inC#

Patrick,

This sounds like a homework assignment.

You're welcome to post code that you've written and ask for
assistance, but I don't think anyone here is going to write the
entire program for you.


Chris.
 
S

Simon Trew

I have got a class that does this conversion (and the reverse conversion)
which I've posted it here before. http://tinyurl.com/gys3 (link to Google
Groups) should find you the thread. (I'm guessing any assignment date has
passed now.)

But it is worth pointing out that you can't really convert numbers >= 10,000
into Roman notation. You'd need to use the "bar" notation (a bar above a
numeral multiplies its values by 1000) but that cannot be readily encoded
into a string. (I guess there might be a combining character somewhere in
the Unicode that would serve this purpose, but it might not have a glyph in
many fonts.)

S.
 
P

Patrick Blackman

Thanks, this is not for a homework assignment, it was actual for a page
numbering sequence an application I am doing... Again thanks.....


Simon Trew said:
I have got a class that does this conversion (and the reverse conversion)
which I've posted it here before. http://tinyurl.com/gys3 (link to Google
Groups) should find you the thread. (I'm guessing any assignment date has
passed now.)

But it is worth pointing out that you can't really convert numbers >= 10,000
into Roman notation. You'd need to use the "bar" notation (a bar above a
numeral multiplies its values by 1000) but that cannot be readily encoded
into a string. (I guess there might be a combining character somewhere in
the Unicode that would serve this purpose, but it might not have a glyph in
many fonts.)

S.
 
S

Simon Trew

I didn't see the original post.

I have just posted the complete class including reverse formatting, more
error checking, and test harnesses, in another thread on this newsgroup.

S.

Patrick Blackman said:
Thanks, this is not for a homework assignment, it was actual for a page
numbering sequence an application I am doing... Again thanks.....
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top