Question: please use matlab the output should be The cost per mile for a rented vehicle is $1.00 for the first 100 miles, $0.80 for the
please use matlab

the output should be


The cost per mile for a rented vehicle is $1.00 for the first 100 miles, $0.80 for the next 200 miles, and $0.70 for all miles in excess of 300 miles. Calculate and display the total cost (t cost) and average cost per mile (a cost pm) for a given input of miles (distance). Utilize the "branching" technique (multiple elseif or nested if construct). Select a, b, or c: c Enter the miles: 90 miles - t cost - a cost - 90 90 1 Select a, b, or c: c Enter the miles: 150 150 t cost - a cost- 0.9333 run Select a, b, or c: c Enter the miles: 400 400 miles t cost a cost - 330 0.8250 Select a, b, or c: z Error using run (line 19) Input a, b, or c ONLY! The cost per mile for a rented vehicle is $1.00 for the first 100 miles, $0.80 for the next 200 miles, and $0.70 for all miles in excess of 300 miles. Calculate and display the total cost (t cost) and average cost per mile (a cost pm) for a given input of miles (distance). Utilize the "branching" technique (multiple elseif or nested if construct). Select a, b, or c: c Enter the miles: 90 miles - t cost - a cost - 90 90 1 Select a, b, or c: c Enter the miles: 150 150 t cost - a cost- 0.9333 run Select a, b, or c: c Enter the miles: 400 400 miles t cost a cost - 330 0.8250 Select a, b, or c: z Error using run (line 19) Input a, b, or c ONLY
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
