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

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!