Program that converts roman numerals to numbers in C language

  Kiến thức lập trình

i am trying to make program for roman numbers converter. in C language
But we have some rules.

Letters are written from left to right and from largest to smallest value.
Example u want to write 1907.But we cant use same letter 4 times.and for the value 900 we should think of it as 1000-100.its write like that CM Not like MC.

and some examples

my most important problem is how ı can change string letter to value

thank u

my example with description