Results 1 to 6 of 6

Thread: hello

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2004
    Posts
    13

    Post hello

    hello
    Last edited by Kbecker; May 11th, 2004 at 09:36 AM.

  2. #2

    Thread Starter
    New Member
    Join Date
    Mar 2004
    Posts
    13
    Someone please.. just a link to something

  3. #3
    Addicted Member
    Join Date
    Aug 2003
    Posts
    153
    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.

  4. #4

    Thread Starter
    New Member
    Join Date
    Mar 2004
    Posts
    13
    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.

  5. #5
    type Woss is new Grumpy; wossname's Avatar
    Join Date
    Aug 2002
    Location
    #!/bin/bash
    Posts
    5,682
    I thought it was a project? Plagirism is naughty.
    I don't live here any more.

  6. #6

    Thread Starter
    New Member
    Join Date
    Mar 2004
    Posts
    13
    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
  •  



Click Here to Expand Forum to Full Width