Question: Write a MATLAB Program using if-ifelse-if to calculate the annual cost of car insurance using the age of the driver. Given: Age less than 25
Write a MATLAB Program using if-ifelse-if to calculate the annual cost of car insurance using the age of the driver.
Given:
Age less than 25 years = Annual Cost is $4800
Age 25 to Age 39 = Annual Cost is $2350
Age 40 and Above = Annual Cost is $2100
Also:
Use fprintf statements to display output for (Age less than 18 = Too young to drive) and (Ages 18-65 = Old enough to drive).
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
