Program Assignment #2 (25 Points)
Total Page:16
File Type:pdf, Size:1020Kb
Roman Numerals – a Brief Primer
The following symbols are used in the Roman numeral system:
Symbol Meaning I 1 V 5 X 10 L 50 C 100 D 500 M 1000
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:
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)
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.
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)
Computer Science I Summer 2006 Sheller Page 1 romanPrimer – web page, zip