The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | May 2017 |
| Last Sign in: | 407 Weeks Ago, 6 Days Ago |
| Questions Answered: | 66690 |
| Tutorials Posted: | 66688 |
MCS,PHD
Argosy University/ Phoniex University/
Nov-2005 - Oct-2011
Professor
Phoniex University
Oct-2001 - Nov-2016
9.11Â Â Â Â Â Â Â Implement and test the following function:
int HinduArabic(string s);
//Â Â Â Returns the Hindu-Arabic numeral equivalent to the Roman
//Â Â Â numeral given in the string s.
//Â Â Â PRECONDITIONS: s contains a valid Roman numeral
//Â Â Â EXAMPLES: HindArabic("MDCCLXXVI") returns 1776,
// HindArabic("MDCCCXII") returns 1812
Note that this is the inverse of the Roman() function in Problem 9.10. [Hint: Write an aux- iliary function int v(string s, int i) that returns the digit for the Roman numeral character s[i]; e.g., v("MDCCCXII", 1) returns 500.]
Hel-----------lo -----------Sir-----------/Ma-----------dam-----------Tha-----------nk -----------You----------- fo-----------r u-----------sin-----------g o-----------ur -----------web-----------sit-----------e a-----------nd -----------and----------- ac-----------qui-----------sit-----------ion----------- of----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n.P-----------lea-----------se -----------pin-----------g m-----------e o-----------n c-----------hat----------- I -----------am -----------onl-----------ine----------- or----------- in-----------box----------- me----------- a -----------mes-----------sag-----------e I----------- wi-----------ll