Question: b) Write a MATLAB code that assigns a cost to a traveling distance depending on the value of the distance the user enters as follows:
b) Write a MATLAB code that assigns a cost to a traveling distance depending on the value of the distance the user enters as follows: Cost 5 Dhs 8 Dhs 10 Dhs 12 Dhs Distance to 100 100+ to 500 500+ to 1,000 1,000+ Sample output Please enter the distance you wish to travel: 500 The cost of this trip is: 8 Dhs
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
