Question
Write the program in C programming Roman Numerals: I = 1 V = 5 X = 10 L = 50 C = 100 D =
Write the program in C programming
Roman Numerals:
I = 1
V = 5
X = 10
L = 50
C = 100
D = 500
M = 1000
Use % for modulus division.
Step 1
- Write a program that will and display 3 menu options. Theoptions are:
- Display the first 50 Roman Numerals.
- Enter a number to be converted to Roman Numerals.
- Exit.
- Prompt the user for a selection: A, B or C.
- If the user selects A then print 2 Columns of numbers on thescreen. The leftmost column will display the roman numeralsfor numbers 1 – 25 and the rightmost column will display the romannumerals for number 26 – 50.
For example:
Number/Numeral Number/Numeral
1 =I 26 = XXVI
2 =II 27 = XXVII
3 =III 28 = XXVIII
4 =IV 29 = XXIX
5 =V 30 = XXX
.
.
25 =XXV 50 = L
Press any key to continue?
- If the user selects B then prompt the user for a number between1 and 3999 and then display the roman numeral. Only allowpositive integers between 1 and 3999. Loop until a validnumber is entered
- If the user selects C then end the program.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started