Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

in c language not c+ The Program: ramp.c Open Kate. Create a new file and save it with the name ramp.c In this program you

in c language not c+

image text in transcribed

The Program: ramp.c Open Kate. Create a new file and save it with the name ramp.c In this program you will calculate the dimensions of a wheelchair ramp. Here are some things you need to know: . The maximum allowable slope in any new construction is 1:12. That means for every 1 inch that the ramp rises vertically, there must be at least 12 inches horizontally. A ramp that is more than 30 feet long (horizontally) must have a landing. 1 Foot 12 Feet 1 foot = 12 inches 2 Feet 24 Feet Here are some examples. You can use these to check your ramp calculations. rise (in) 10 20 30 40 50 60 70 80 90 100 rise (ft) 0.8 1.7 2.5 3.3 4.2 5.0 5.8 6.7 7.5 8.3 horizontal (ft) 10.0 20.0 30.0 40.0 50.0 60.0 70.0 80.0 90.0 100.0 ramp length (ft) 10.0 20.1 30.1 40.1 50.2 60.2 70.2 80.3 90.3 100.3 In the main function: 1) Display a prompt and input the rise. Note: the number may have a decimal point and the units are inches. 2) Determine whether the ramp requires a landing. If it does, display the message "The ramp requires a landing." If you need a refresher on if statements, see Chapter 3. 3) Convert the rise to feet and store the value in a separate variable. 4) Using the 1:12 ratio, calculate the horizontal distance that the ramp will cover and the ramp length ( the hypotenuse of the triangle ). 5) Display the horizontal distance (in feet) with a meaningful message. Limit the value to 1 digit to the right of the decimal point. 6) Display the ramp length (in feet) with a meaningful message. Limit the value to 1 digit to the right of the decimal point

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

Advances In Databases And Information Systems 23rd European Conference Adbis 2019 Bled Slovenia September 8 11 2019 Proceedings Lncs 11695

Authors: Tatjana Welzer ,Johann Eder ,Vili Podgorelec ,Aida Kamisalic Latific

1st Edition

3030287297, 978-3030287290

Students also viewed these Databases questions