Program Assignment #2 (25 Points)

Program Assignment #2 (25 Points)

<p>Roman Numerals – a Brief Primer</p><p>The following symbols are used in the Roman numeral system:</p><p>Symbol Meaning I 1 V 5 X 10 L 50 C 100 D 500 M 1000</p><p>Numbers are formed according to the following rules: 1. Only numbers from 1 to 3999 are represented (the Romans didn’t have the concept of 0). 2. As in the decimal system, the thousands, hundreds, tens and ones are expressed separately. 3. The numbers 1 – 9 are expressed as:</p><p>Roman numeral Decimal equivalent Explanation I 1 I is the symbol for 1 II 2 1 + 1 III 3 1 + 1 + 1 IV 4 5 - 1 V 5 V is the symbol for 5 VI 6 5 + 1 VII 7 5 + 1 + 1 VIII 8 5 + 1 + 1 + 1 IX 9 10 – 1 (X is the symbol for 10)</p><p> Generally, an ‘I’ preceding a ‘V’ or ‘X’ is subtracted from the second letter’s value  Otherwise, the values of the letters are added together  You never have more than 3 ‘I’s in a row.</p><p>4. Tens and hundreds are done the same way, except that the letters X, L, C and C, D, M are used instead of I, V and X respectively; some examples:  XL = 40 (50 – 10)  LXXX = 80 (50 + 10 + 10 + 10)  CM = 900 (1000 – 100)  CDXL = 440 (500 – 100 + 50 – 10)  MLXIII = 1063 (1000 + 50 + 10 + 1 + 1 + 1)  MDCCLXXVI = 1776 (1000 + 500 + 100 + 100 + 50 + 10 + 10 + 5 + 1)</p><p>Computer Science I Summer 2006 Sheller Page 1 romanPrimer – web page, zip</p>

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    1 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us