hw3q1logical - end if ((GroupAmount >=4)...

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

View Full Document Right Arrow Icon
fprintf('Number of people in group \n'); Cost = 0.0; GroupAmount = input(''); if (GroupAmount >20); Cost = 5.00*GroupAmount; end if ((GroupAmount >=9) & (GroupAmount <=20)); Cost = 6.0*GroupAmount;
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: end if ((GroupAmount &gt;=4) &amp;&amp; (GroupAmount &lt;=8)); Cost = 6.5*GroupAmount; end if (GroupAmount &lt;4); Cost = 7*GroupAmount; end e fprintf('Total Cost is $%0.2f \n', Cost);...
View Full Document

Ask a homework question - tutors are online