-3

I know s is the string of roman numerals but because I don't know what i stand for, I am not sure what s[i] means. I am trying to understand the solution that is posted line by line, but am stuck with this specific part. All help is appreciated, I understand the roman numeral system fully.

problem attached

Yash Mehta
  • 2,025
  • 3
  • 9
  • 20
  • 1
    Welcome to stack overflow! Please [edit] your question to include a [mcve] with the code as text in the body of the question, rather than as an image or link – G. Anderson Dec 14 '22 at 18:38
  • Please provide enough code so others can better understand or reproduce the problem. – Community Dec 15 '22 at 12:07

1 Answers1

0

"i" is the index of the character being examined in "s". Index starts at 0.
"total" is an accumulator. It is the sum of values of each roman character.

user3435121
  • 633
  • 4
  • 13