Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write a program in MATLAB and Upload as a single .m file in the location, WT Cla

ID: 1750533 • Letter: W

Question

Write a program in MATLAB and Upload as a single .m file in the location, WT Class s.Lessons ...Final Exam [30 points depends on the lot you select, and how long you stay Consider this rate structure from the DFW International Airport during the summer of 2008 Long-Term (Economy) Parking 8. Most major airports have separate lots for long-term and short-term parking. The cost to park The first hour is $1.00, and each additional hour or fraction thercof is $1.00 Daily maximum $6.00 Weekly maximum $42.00 Short-Term Parking The first 30 minutes are free and each additional 20 minutes or fraction thereof is S1.00 Daily maximum $25.00 Write a program that asks the user the following: Which lot are you using? How many weeks, hours, days, and minutes did you park? Your program should then calculate the parking bill.

Explanation / Answer

option=input('enter 1 for long term and 2 for short term');

min=input('enter the minutes');
hour=input('enter the hours');
  
day=input('enter the days');
week=input('enter the weeks');
bill=0;
if (option==1)
if(hour>6)
hour=6;
end
if(min>0)
bill=42*week+6*day+hour*1+1;
else
bill=42*week+6*day+hour*1;
end
else
if(hour>8)
day=day+1;
hour=0;
min=0;
bill=day*25;
elseif(min<=30)
bill=0;
elseif(min>30&&hour==0)
c=ceil((min-30)/20);
bill=c;
elseif(min>30&&hour>1)
c=ceil((min-30)/20);
bill=hour*3+c;
end
end
disp('bill is');
disp(bill);

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote