Company: Deloitte_18oct
Difficulty: medium
Roman Numerals to Decimal Problem Description In a book store, the books are arranged using Roman Numeral values. Lata wants to issue some books for which she needs to know the Decimal Numeral values. Write a program to help Lata in issuing books by converting Roman Numerals to Decimal Format. The Roman numerals should be entered as per the stipulated rules. The mapping of Roman numerals to their decimal values is as follows: Roman Decimal I 1 V 5 X 10 L 50 C 100 D 500 M 1000 Read the Input from STDIN (standard input) and Print to STDOUT (standard output) with a trailing new line. You should not write arbitrary strings while reading the input and while printing as these contribute to the standard output. Constraints Input should be a valid Roman Numeral value. Input Format: The input contains the Roman Numeral value. Output Format: The output contains the Decimal Numeral value. Print 0 if the Roman number provided as input is invalid. Examples Example 1: Input: XVII Output: 17 Explanat