about | help | code help+videos | done | prefs |
Friends, Romans, Countrymen lend me your ear. We will soon have a program which will allow us Romans to communicate with the barbarians by converting our numerals into their numbers and doing an operation! - Programmers please complete the code to receive TWO Roman numeral (strings)and an operator character (+,-,*,/, and %), combine these numbers, and return the Natural number answer. Please be advised that we will be concerned with changing "IV" into 4 example XIV + X will return 24. Note the largest Roman character is M for 1000. Choose the hint for the other values and characters. REMEMBER Romans are not negative and we have not learned decimal numerals (yet), BUT we do know NOT to divide by nothing (ZERO) -- SO we will never do that. RomanCalculatorTwo("M", "M", "+") → 2000 RomanCalculatorTwo("MMMX", "C", "%") → 10 RomanCalculatorTwo("MMCD", "CM", "-") → 1500 ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 198 Post-solution available
Copyright Nick Parlante 2017 - privacy