In order to estimate the cost of painting a house, a painter needs to know the surface area of the exterior. Develop an algorithm for computing that value. Your inputs are the width, length, and height of the house, the number of windows and doors, and their dimensions. (Assume the windows and doo
All Answers
total answers (1)
// Inputs are one way distance, fuel efficiency, train ticket price
need an explanation for this answer? contact us directly to get an explanation for this answercost of gallon of gas = 4 // $4 per gallon
car maintenance = .05 // $0.05 per mile
cost of car = one way distance / fuel efficiency * cost of gallon of gas +
one way distance * car maintenance
if cost of car < train ticket price
choose to drive car.
else
choose to take train.