This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: elseif (k > 25) got = got + 100 * k; shares = shares - 100; end end got = 100*sum(price.*(price>25)) increase = price(length(price))*shares - price(1)*1000 - paid + got; Paid = 7300 Got = 5600 Shares = 1200 Increase = 14100 (if you just used the difference in share price, as in the text, increase = 15800) Engineering ENGR 215 College of San Mateo L. Demsetz 3. Write and test the program described in Problem 16 on page 191 4. Write and test the program described in Problem 30 on page 197. Use at least one while loop in your program. Submit your code as A5P4.m (with appropriate comments). Paste as comments at the end of the file evidence that you have tested the code thoroughly....
View Full Document