C Exercises: Convert a given integer to roman number
6. Integer to Roman Numeral Variants
Write a C program to convert a given integer to a Roman number.
Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M. Symbol Value I 1 V 5 X 10 L 50 C 100 D 500 M 1000
C Code:
Sample Output:
Original integer: 12 Roman number of the said integer: XII
Pictorial Presentation:
Flowchart:

For more Practice: Solve these Related Problems:
- Write a C program to convert an integer (up to 3999) to a Roman numeral using iterative subtraction.
- Write a C program to convert an integer to its Roman numeral representation recursively.
- Write a C program to convert an array of integers to their corresponding Roman numerals.
- Write a C program to validate the Roman numeral conversion by converting back to an integer.
C Programming Code Editor:
Contribute your code and comments through Disqus.
Previous C Programming Exercise: Reverse digits of a given a 32-bit signed integer.
Next C Programming Exercise: Convert a given roman number to an integer.
What is the difficulty level of this exercise?
Test your Programming skills with w3resource's quiz.