int
romanToIndian(char *s) {
int symLen;
int result = 0;
//loop through all the characters
while(*s) {
for(int i=0; i<sizeof(SYM) / sizeof(SYM[0]); i++) {
symLen = strlen(SYM[i]);
if(!strncmp(s, SYM[i], symLen)) {
//i've found the symbol
result += NUM[i];
//update
s += symLen;
break;
}
}
}
return result;
}
void
indianToRoman(int n) {
//go through the values
for(int i=0; i<sizeof(NUM)/sizeof(NUM[0]); i++) {
//display the correct number of that roman numeral
for(int j=0; j<n/NUM[i]; j++) {
cout << SYM[i];
}