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

Info icon This 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
Image of page 1

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

View Full Document Right Arrow Icon
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

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern