
jay shah
Followers: 0 Following: 0
Statistiques
1 Question
0 Réponses
RANG
117 387
of 297 547
RÉPUTATION
0
CONTRIBUTIONS
1 Question
0 Réponses
ACCEPTATION DE VOS RÉPONSES
0.0%
VOTES REÇUS
0
RANG
of 20 454
RÉPUTATION
N/A
CLASSEMENT MOYEN
0.00
CONTRIBUTIONS
0 Fichier
TÉLÉCHARGEMENTS
0
ALL TIME TÉLÉCHARGEMENTS
0
RANG
of 159 122
CONTRIBUTIONS
0 Problèmes
0 Solutions
SCORE
0
NOMBRE DE BADGES
0
CONTRIBUTIONS
0 Publications
CONTRIBUTIONS
0 Public Chaîne
CLASSEMENT MOYEN
CONTRIBUTIONS
0 Point fort
NOMBRE MOYEN DE LIKES
Feeds
Question
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 ...
environ 7 ans il y a | 1 réponse | 0