Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question 3 Write a program that will compute the volume of a room. User inputs are the height, width and length of a room. For

Question 3
Write a program that will compute the volume of a room. User inputs are the height, width and length of a room. For example, if the user inputs the height as 3, the width as 4 and the length as 5 the volume will be 3**4**5=60. You have to declare three functions: one for input; one to do the calculation; and one for output.
The input function getData has to input the height, width and length into the variables theHeight, theWidth and theLength.
The calculation function, calculateVolume will receive three parameters that represent the height, width and length, do the calculation and return the volume of the room.
The output function displayOutput has to display the height, width and length entered by the user as well as the volume.
The program also has to indicate the size of the room as small, medium or large. If the volume is less than 100, the size is small, between 100 and 500 the size is medium and greater than 500 the size is large. For example:The main function should include a for loop that allows the user to repeat the calculation of the volume for new input values five times.5INP1501/102/0/2024
You must submit the three functions and the main function you have developed, as well as output produced by the following input data:
345
101412
877
12148
15812
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_2

Step: 3

blur-text-image_3

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

Neo4j Data Modeling

Authors: Steve Hoberman ,David Fauth

1st Edition

1634621913, 978-1634621915

More Books

Students also viewed these Databases questions