Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Chapter 3 : Programming Project 1 Unlimited tries For this project you will write a program that converts numbers to Roman numerals. Your program must

Chapter 3: Programming Project 1
Unlimited tries
For this project you will write a program that converts numbers to Roman numerals. Your program must display the following string as a prompt:
"Enter a number in the range of 1-10:"
The prompt must appear exactly as it is shown here. (Make sure that one space appears at the end of the string, after the colon.)
After displaying the prompt, the program should read an integer from the keyboard. If the input is within the range of 1 through 10, the program should then display the Roman numeral version of that number. If the input is not within the range of 1 through 10, the program should display the following string as an error message:
"Invalid number."
Your program class should be named RomanNumerals. Here are three sample runs of the program:
Sample Run
Enter a number in the range of 1-10:4 IV
Sample Run
image text in transcribed

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

101 Database Exercises Text Workbook

Authors: McGraw-Hill

2nd Edition

0028007484, 978-0028007489

More Books

Students also viewed these Databases questions

Question

Subtract the binary numbers. 10011 1110

Answered: 1 week ago