I cannot figure out if this is right because there is no example to verify calculations and I have gone over this a few hours now. I do not need help with programming, just the correct mathematics.
"Your kid brother plans to start a lawn-mowing service this summer, and he wants to earn $10 per hour.
The input is (in feet) the length and width of a rectangular yard and the length and width of the house situated in the yard.
All input is in feet. His average speed for mowing is .20 square yards per second. The amount to charge the customer should be printed as output."
Here is what I have:
MowYardsPerHour = .20 * 60 * 60;
MowRate = 10;
houseLength = houseLength /3;
houseWidth = houseWidth /3;
yardLength = yardLength /3;
yardWidth = yardWidth /3;
squareYdYard = yardLength * yardWidth;
squareYdHouse = houseLength * houseWidth;
mowRange = squareYdYard - squareYdHouse;
amountDue = (mowRange / MowYardsPerHour) * MOW_RATE;
Is this right way to calculate the rate??