![photo](/responsive_image/150/150/0/0/0/cache/matlabcentral/profiles/16003414_1566476157650_DEF.jpg)
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