It is possible to convert Roman numbers to Arabic numbers by using loop and if-else statement. Here is my suggestion: read the Roman numbers from the left to the right. If the leftmost number is greater than the number next to it (to the right), then that number (the leftmost) is a positive number. If it is not, then it is a negative number. Then keep comparing the next number (to the right). Notice: in case both successive numbers are equal, treat them like a single number, and keep comparing.
For example: XIV. We first compare X and I. Since X is greater than I, X is a positive number (+10). Then compare I and V. Since I is less than V, then I = -1. After V there is no number, then V = +5. So +10 - 1 + 5 = 14.