This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: % Function call [tip15 tip20 total15 total20] = rcu_mealcost(price) fprintf('Price of meal: $%.2f\n',price) fprintf('15 percent tip: $%.2f\n',tip15) fprintf('20 percent tip: $%.2f\n',tip20) fprintf('Total price with a 15 percent tip: $%.2f\n',total15) fprintf('Total price with a 20 percent tip: $%.2f\n',total20) Sheet1 Page 2 create variables for each return value and input price %print price of meal %print price of 15% tip %print price of 20% tip %print total price with 15% tip %print total price with 20% tip...
View Full Document
This note was uploaded on 01/22/2011 for the course ENG 006 taught by Professor Lagerstrom during the Spring '06 term at UC Davis.
- Spring '06