![photo](/responsive_image/150/150/0/0/0/cache/matlabcentral/profiles/10090180_1522135117926_DEF.jpg)
jay shah
Attivo dal 2018
Followers: 0 Following: 0
Statistica
MATLAB Answers
1 Domanda
0 Risposte
RANK
159.270
of 292.708
REPUTAZIONE
0
CONTRIBUTI
1 Domanda
0 Risposte
ACCETTAZIONE DELLE RISPOSTE
0.0%
VOTI RICEVUTI
0
RANK
of 147.865
CONTRIBUTI
0 Problemi
0 Soluzioni
PUNTEGGIO
0
NUMERO DI BADGE
0
CONTRIBUTI
0 Post
CONTRIBUTI
0 Pubblico Canali
VALUTAZIONE MEDIA
CONTRIBUTI
0 Punti principali
NUMERO MEDIO DI LIKE
Feeds
Domanda
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.
my code is function [fare] = fare(a,d) if d<=1 fare = 2; elseif d<=10 fare = 2+0.25*(d-1); else ...
oltre 6 anni fa | 1 risposta | 0