Write a script/function/program that converts a user inputted number or Roman numeral to its equivalent?
Ältere Kommentare anzeigen
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.
Antworten (1)
Sean de Wolski
am 6 Nov. 2014
0 Stimmen
No reason to reinvent the wheel.
Kategorien
Mehr zu Introduction to Installation and Licensing finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!