rect10_vallillo_Proj01

# rect10_vallillo_Proj01 - %Code for parking receipt...

This preview shows pages 1–2. Sign up to view the full content.

%Code for parking receipt clear;clc; disp('Please use whole numbers while answering the questions, do not use decimals, round up to the nearest incriment spcified (if you were parked for 15 minutes and it charges by 30 minute intervals, round up to 30 minutes). Also enter words as specified: if it say enter yes or no, do NOT enter Yes or No.\n') type=input('Enter 1 for short term parking, 2 for daily parking in P3, 3 for daily parking in P4, or 4 for economy long term parking.\n'); switch type % Short term parking code case 1 disp('Short term parking costs 3.00\$ for each half hour, up to a maximum of 33.00\$ for an entire day. If you stayed for 5 hours and 30 minutes or longer please input that you stayed a full day.') time=input('Did you stay for more than 5 hours and 30 minutes? (If you stayed 5 hours and 30 minutes or longer you are charged for an entire day). Enter: yes or no\n','s'); switch time case 'no' hour=input('How many 30 minute increments did you stay?\n'); if hour>=11 disp('If you stayed for 5 hours and 30 minutes or longer you are charged for an entire day, please go back and follow directions.') elseif hour<11 cost=(hour)*3.00; fprintf('You owe %.001f dollars. Thank you.\n',cost) end case 'yes' day=input('How many days did you stay?\n');

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern