
Take symbol one by one from starting from index 0:. Convert each symbol of Roman Numerals into the value it represents. Split the Roman Numeral string into Roman Symbols (character). C placed before D or M indicates a hundred less, so four hundred is CD (a hundred less than five hundred) and nine hundred is CM (a hundred less than a thousand).Īlgorithm to convert Roman Numerals to Integer Number:. X placed before L or C indicates ten less, so forty is XL (10 less than 50) and 90 is XC (ten less than a hundred). I placed before V or X indicates one less, so four is IV (one less than 5) and 9 is IX (one less than 10).
However, in a few specific cases, to avoid four characters being repeated in succession(such as IIII or XXXX), subtractive notation is often used as follows: SYMBOL VALUEĪpproach: A number in Roman Numerals is a string of these symbols written in descending order(e.g. Roman numerals are based on the following symbols. ISRO CS Syllabus for Scientist/Engineer Exam.
ISRO CS Original Papers and Official Keys. GATE CS Original Papers and Official Keys.