Ad Code

Responsive Advertisement

Roman Numerals to Integer using C

 

Roman to Integer Using C program

Roman Numerals to integer


Program for converting Roman to equivalent Integer:

C Program:

Output 1:

Roman to Integer output

Output 2:

Roman to integer outpuut2


From the above program,

ü The roman numeral is stored in the array 's'.

ü The romans such as 'I','V','X','L','C','D' has specific decimal values which are listed in the value() function in the above program.

ü Let us take CDCM as the input string.

ü Therefore the length of the string will be 4.


ü Thus the final res value will be 1300 and prints the same.

Post a Comment

0 Comments

Close Menu