====== Differences ====== This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
gibson:teaching:fall-2014:math445:hw4solns [2014/10/23 07:59] gibson [Math 445 HW4 solutions] |
gibson:teaching:fall-2014:math445:hw4solns [2014/10/23 09:09] (current) gibson |
||
---|---|---|---|
Line 22: | Line 22: | ||
% return dollar value of q quarters, d dimes, and n nickels | % return dollar value of q quarters, d dimes, and n nickels | ||
- | if q != round(q) | d != round(d) | n != round(n) | + | if q != round(q) || d != round(d) || n != round(n) |
fprintf('error: arguments q,d,n should all have integer values'); | fprintf('error: arguments q,d,n should all have integer values'); | ||
dollars = 0.25*q + 0.10*d + 0.05*n; | dollars = 0.25*q + 0.10*d + 0.05*n; |