Question: Skills Needed: This machine problem will cover cin, cout, constants, arithmetic expressions, meaningful variable names, spacing, indentation, documentation, and output. Worth: 50 points Purpose: Write

 Skills Needed: This machine problem will cover cin, cout, constants, arithmeticexpressions, meaningful variable names, spacing, indentation, documentation, and output. Worth: 50 points

Skills Needed: This machine problem will cover cin, cout, constants, arithmetic expressions, meaningful variable names, spacing, indentation, documentation, and output. Worth: 50 points Purpose: Write a program to compute the time it will take to walking mow a rectangular lawn with a rectangular house on it. The program prompts the user to input 5 values which represent: (use cin to prompt each one or all together, please go to module 3 for details before you start doing the homework) 1. the length of the lawn, 2. the width of the lawn, 3 . the length of the house, 4. the width of the house (in feet), 5. the speed that you walk (in miles per hour). Echo (means use cout) this input and then compute the area to be mown (in square feet) by subtracting the area of the house from the total area of the lawn. Print out this value. Next, calculate your rate of mowing in square feet per minute, assuming that the width of the mower is 18 inches. Print this value. Note: Use these conversion factors: 1 mile =5280 feet, 1 foot =12 inches and 1 hour =60 minutes. Finally, calculate the time in minutes it will take to mow the lawn and print this out. You may leave this as a floating-point value. You are to run the program 2 times using the following input values: Note that you must use the correct mathematical expressions in your program to do the conversions of the different units. Please turn in the program and the outputs of running the program 2 times as directed. Be sure to use good style, appropriate comments and make use of constants. Sample output for first set of data Your output format should look similar in style to the one below. You do not have to copy this exactly. Mowing the lawn by (your name) Enter five numbers separated by blanks They represent the length and width of lawn in feet, the length and width of the house in feet and the walking speed in mph 200.050.0100.025.01.5 The lawn is 200 by 50 feet The house is 100 by 25 feet Your walking speed is 1.5mph The area to mow is 7500 square feet (the formula is 200 * 50 - 100 * 25) You can mow 198sq. ft. per min (the formula is 5280/60 ) Time to mow the lawn is 37.8788 minutes (the formula is 7500/198/(18.0/12.0) )

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!