roman equiallent

Discussion in 'C' started by deepakkrmehta, Mar 12, 2006.

  1. deepakkrmehta

    deepakkrmehta New Member

    Joined:
    Mar 10, 2006
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    helo all group members
    sir plz solve this problem
    1. )
    1===========I
    5========== V
    9 =========IX
    10=========X


    when i enter 15 then it have to show roman equiallent =XV
    plz sir make this program in c++ or give me logic to implement it
    thanx
    from
    deepak
     
  2. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,375
    Likes Received:
    388
    Trophy Points:
    83
    Re: The theory behind Roman Numbers

    An accurate way to write large numbers in Roman numerals is to handle first the thousands, then hundreds, then tens, then units.
    Example: the number 1988.
    One thousand is M, nine hundred is CM, eighty is LXXX, eight is VIII.
    Put it together: MCMLXXXVIII (ⅯⅭⅯⅬⅩⅩⅩⅤⅠⅠⅠ).

    Now to just get the no out of ⅯⅭⅯⅬⅩⅩⅩⅤⅠⅠⅠ

    To understand any number written in Roman Just use the following tip
    M=1000, D=500, C=100, L=50, X=10, V=5 and I=1.
    As long as the symbols are in numeric order, you just add the values. However, if a symbol is out of order, you subtract it.

    1000 - 100 +1000 + 50 + 10 + 10 + 10 + 5 + 1 + 1 + 1 = 1988.

    Thanks
    Shabbir
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice