Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Computer Performance Engineering 10th European Workshop Epew 2013 Venice Italy September 17 2013 Proceedings

Authors: Maria Simonetta Balsamo ,William Knottenbelt ,Andrea Marin

2013 Edition

3642407242, 978-3642407246

More Books

Students also viewed these Programming questions

Question

How are interfund transactions reported?

Answered: 1 week ago