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:
  1. Display the first 50 Roman Numerals.
  2. Enter a number to be converted to Roman Numerals.
  3. 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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!