Design a program using pseudocode that prompts the user to enter a number within the range of 1 - 10. The program should then display the roman numeral version of that number . If the number is outside of the range 1-10, the program should display an error message. Here are some necesary parameters to help solve the problem. a. Create a main module. It should declare one local variable and call two other modules.  b. Create a module to get input from the software user.  c. Create a module that uses a Case structure  Please declare variables/constants, write line numbers before each line of the algorithm, include blank numbered lines between modules and write comments. **example of desired format is attatched

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter6: Modularity Using Functions
Section: Chapter Questions
Problem 9PP
icon
Related questions
Question

Design a program using pseudocode that prompts the user to enter a number within the range of 1 - 10. The program should then display the roman numeral version of that number . If the number is outside of the range 1-10, the program should display an error message. Here are some necesary parameters to help solve the problem.
a. Create a main module. It should declare one local variable and call two other modules. 
b. Create a module to get input from the software user. 
c. Create a module that uses a Case structure 

Please declare variables/constants, write line numbers before each line of the algorithm, include blank numbered lines between modules and write comments.

**example of desired format is attatched 

123 45 O709
Module main()
|/ Declare a variable for the
// number of cups needed.
Declare Real cupsNeeded
|| Display an intro message.
Call showIntro()
// Get the number of cups.
Call getCups (cupsNeeded)
6.
10
11
|| Convert cups to ounces.
Call cupsTo0unces (cupsNeeded)
12
13
14 End Module
15
16 |/ The showIntro module displays an
17 1/ introductory screen.
18 Module showIntro ()
Display "This program converts measurements
Display "in cups to fluid ounces. For your"
Display "reference the formula is:"
Display
%3D
20
21
%3D
%3D
22
1 cup 8 fluid ounces
%3D
23 End Module
24
25 |/ The getCups module gets the number of cups
26 /| and stores it in the reference variable cups.
27 Module getCups (Real Ref cups)
Display "Enter the number of cups
Input cups
28
30 End Module
31
|/ The cupsToOunces module accepts a number
33 77 of cups and displays the equivalent number
34 // of ounces.
35 Module cupsTo0unces (Real cups)
// Declare variables.
37
Declare Real ounces
38
// Convert cups to ounces.
Transcribed Image Text:123 45 O709 Module main() |/ Declare a variable for the // number of cups needed. Declare Real cupsNeeded || Display an intro message. Call showIntro() // Get the number of cups. Call getCups (cupsNeeded) 6. 10 11 || Convert cups to ounces. Call cupsTo0unces (cupsNeeded) 12 13 14 End Module 15 16 |/ The showIntro module displays an 17 1/ introductory screen. 18 Module showIntro () Display "This program converts measurements Display "in cups to fluid ounces. For your" Display "reference the formula is:" Display %3D 20 21 %3D %3D 22 1 cup 8 fluid ounces %3D 23 End Module 24 25 |/ The getCups module gets the number of cups 26 /| and stores it in the reference variable cups. 27 Module getCups (Real Ref cups) Display "Enter the number of cups Input cups 28 30 End Module 31 |/ The cupsToOunces module accepts a number 33 77 of cups and displays the equivalent number 34 // of ounces. 35 Module cupsTo0unces (Real cups) // Declare variables. 37 Declare Real ounces 38 // Convert cups to ounces.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Graphical User Interface
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning