Write a script/function/program that converts a user inputted number or Roman numeral to its equivalent?
Afficher commentaires plus anciens
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.
Réponses (1)
Sean de Wolski
le 6 Nov 2014
0 votes
No reason to reinvent the wheel.
Catégories
En savoir plus sur Introduction to Installation and Licensing dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!