|
-
Apr 21st, 2004, 03:30 PM
#1
Thread Starter
New Member
hello
Last edited by Kbecker; May 11th, 2004 at 09:36 AM.
-
Apr 22nd, 2004, 05:40 PM
#2
Thread Starter
New Member
Someone please.. just a link to something
-
Apr 22nd, 2004, 08:22 PM
#3
Addicted Member
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.
-
Apr 22nd, 2004, 10:39 PM
#4
Thread Starter
New Member
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.
-
Apr 23rd, 2004, 09:45 AM
#5
I thought it was a project? Plagirism is naughty.
I don't live here any more.
-
Apr 23rd, 2004, 10:12 AM
#6
Thread Starter
New Member
Or a sample code, just to get the idea.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|