Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
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: 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 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
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started