Nimra Mubeen
2019년부터 활동
Followers: 0 Following: 0
Feeds
답변 있음
Write a function called fare that computes the bus fare one must pay in a given city based on the distance travelled. Here is how the fare is calculated: the first mile is $2. Each additional mile up to a total trip distance of 10 miles is 25 cents.
function fare =taxi_fare(d,t) fare=5+(ceil(d-1)*2)+(ceil(t)*.25)
Write a function called fare that computes the bus fare one must pay in a given city based on the distance travelled. Here is how the fare is calculated: the first mile is $2. Each additional mile up to a total trip distance of 10 miles is 25 cents.
function fare =taxi_fare(d,t) fare=5+(ceil(d-1)*2)+(ceil(t)*.25)
대략 5년 전 | 0