hello
Printable View
hello
Someone please.. just a link to something :(
To me it doesn't require any funky bits of code, just some logical.
How I would approach it is to store the roman numerals as a string, and read the year as an integer. Find the biggest possible remaining value and subtract it from the integer, add it to the roman string.
e.g
Your MCMXCVIII example
Int = 1997
Str = ""
Biggest possible value is M
Int = 997
Str = "M"
Biggest possible value is CM
Int = 97
Str = "MCM"
Biggest possible value is CX
Int = 7
Str = "MCMCX"
Biggest possible value Is VII
Int = 0
Str = "MCMCXVII"
As you can see its basically a case of going thru the integer from highest decimal value to lowest, and finding the Roman equivilant for that decimal place. Wouldn't be hard to set it up as a recurisive function, or a while loop.
Not to sure how to do that.. I'm pretty much a beginner in VB.net, anything you know of I can download? Or a sample code, just to get the idea.
I thought it was a project? ;) Plagirism is naughty.
Quote:
Or a sample code, just to get the idea.