{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

calcGas - %driven and the price of one gallon of

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
function total_cost_of_gas=calcGas(distance_in_miles,miles_per_gallon_of_vehicle,price_of_ga llon_of_gas) %function to compute the amount of money a person will spend on gas given %the distance traveled in miles, the miles per gallon of the vehicle being
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: %driven, and the price of one gallon of gas. %usage: [total_cost_of_gas]=calcGas(distance_in_miles,miles_per_gallon_of_ve %hicle,price_of_gallon_of_gas) total_cost_of_gas=(distance_in_miles./miles_per_gallon_of_vehicle).*price_of_gallon _of_gas;...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online