Write a script/function/program that converts a user inputted number or Roman numeral to its equivalent?
Show older comments
1) Write a script/function/program that converts a user inputted number or Roman numeral to its equivalent.
Recall Roman Numerals where:
I = 1
V = 5
X = 10
L = 50
C = 100
D = 500
M = 1000
Also remember IX is 9 (10 - 1) while XI = 11 (10+1) but XIX = 19 (10+9)
Most likely you will use the following function: str = input('Roman numeral: ','s')
Just to clarify -- your program should prompt a user to convert a Roman numeral into it’s numerical equivalent or take a number and output the equivalent Roman numeral.
Answers (1)
Sean de Wolski
on 6 Nov 2014
0 votes
No reason to reinvent the wheel.
Categories
Find more on Introduction to Installation and Licensing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!