Question: 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+

in c language not c+ The Program: ramp.c Open Kate. Create a

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!