/* Name: Andrew Charles Breiner * Homework 1 * Chapter 2, Page 92, Program 9 * Input yard and house demensions and comput time needed to * mow the yard */ #include /* printf, scanf definitions */ #define MOW 2.0; /* Mowing speed */ int main(void) { double ylen, ywid, hlen, hwid; /* declares as type double */ double yar, har, time; /* declares as type double */ /* Asks user for yard and house width and lengh */ printf("Enter the length and width of the yard: "); scanf("%lf%lf", &ylen, &ywid); printf("Enter the length and width of the house: "); scanf("%lf%lf", &hlen, &hwid); /* Compute area of yard/house and compute time needed to mow */ yar = ylen * ywid; har = hlen * hwid; time = (yar - har) / MOW; /* Output time needed to mow */ printf("The time needed to cute the grass is %.2f seconds.\n", time); return 0; } //main