HW6 #1 - tip20 = price*0.20 total15 = price tip15 total20 =...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Sheet1 Page 1 %Engineering 6, Spring 2004, Problem 6.1 %Ryan Uy, 2509 %Section B05, Tues. 3-4 function [tip15, tip20, total15, total20] = rcu_mealcost(price) % rcu_mealcost Cost of a meal for various tips % rcu_mealcost(price) takes the price of a meal and calculates a 15% % tip, a 20% tip, and the total amount due in each case tip15 = price*0.15
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: tip20 = price*0.20 total15 = price + tip15 total20 = price + tip20 Sheet1 Page 2 %take the price, and multiply it by 0.15 to get 15% tip %take the price, and multiply it by 0.20 to get 20% tip %take the value for at 15% tip and add it to current price %take the value for at 20% tip and add it to current price...
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.

Page1 / 2

HW6 #1 - tip20 = price*0.20 total15 = price tip15 total20 =...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online