project 1 - disp('parking costs $18');...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
%% Short term parking x= input('enter how many hours parked rounded up to the half hour:'); if(x<=.5) disp('parking costs $3'); elseif(1>=x)(x>.5) disp('parking costs $6'); elseif(1.5>=x)(x>1) disp('parking costs $9'); elseif(2>=x)(x>1.5) disp('parking costs $12'); elseif(2.5>=x)(x>2) disp('parking costs $15'); elseif(3>=x)(x>2.5)
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: disp('parking costs $18'); elseif(3.5>=x)(x>3) disp('parking costs $21'); elseif(4>=x)(x>3.5) disp('parking costs $24'); elseif(4.5>=x)(x>4) disp('parking costs $27'); elseif(5>=x)(x>4.5) disp('parking costs $30'); elseif(5.5>=x)(x>5) disp('parking costs $33'); elseif(6>=x)(x>5.5)...
View Full Document

This note was uploaded on 03/24/2011 for the course ENGINEERIN 127 taught by Professor Finch during the Spring '08 term at Rutgers.

Ask a homework question - tutors are online