76.6k views
5 votes
Write a cost function for the cost c to rent a car for d days

User Fchancel
by
5.0k points

1 Answer

5 votes

Answer:

cost = c*d

Explanation:

Unless the cost is calculated by the time (hours) or mileage, we can use the number of days in the calculation.

Everyday is one unit of c, so c times the number of days it is used gives us the cost. Simply multiply the number of days by cost per day to get the total cost.

User Jetty
by
5.3k points