Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

SET-151 C Programming #1 Homework: 7.5 Roman Numerals Just C not C++ please use this format // ------------------------------------------------------------------------------------------ // Name: Your name here // Class:

SET-151 C Programming #1

Homework: 7.5 Roman Numerals

Just C not C++

please use this format

// ------------------------------------------------------------------------------------------ // Name: Your name here // Class: C Programming // Abstract: Homework 1. // ------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------ // Includes // ------------------------------------------------------------------------------------------ #include #include // ------------------------------------------------------------------------------------------ // Constants // ------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------ // Prototypes // ------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------ // Name: main // Abstract: This is where the program starts // ------------------------------------------------------------------------------------------ void main( ) { } 

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. The options 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 the screen. The leftmost column will display the roman numerals for numbers 1 25 and the rightmost column will display the roman numerals 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 between 1 and 3999 and then display the roman numeral. Only allow positive integers between 1 and 3999. Loop until a valid number 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

How Do I Use A Database Research Tools You Can Use

Authors: Laura La Bella

1st Edition

1622753763, 978-1622753765

More Books

Students also viewed these Databases questions