Jbo214hw3 - More=change/0.10 More=37.306 Pennies=change*100 Pennies=373.06 Some=(pennies0/10 Some7.306 More and some are integers so values get

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Joshua Okrent Joshua Okrent LIN: 819710517 October 5, 2010 HW 3 Khadija Benjlali Section 12 2.50 Output: It’ll take 1 pages to cover sphere1. It’ll take 1 pages to cover sphere2. It’ll take 2 pages to cover sphere3. It’ll take 5 pages to cover sphere4. It’ll take 8 pages to cover sphere5. It’ll take 1 pages to cover sphere6. 2.51 Solution: Change=money(10)-1.06*cost(.99)*6 Change = 3.7306
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: More=change/0.10 More=37.306 Pennies=change*100 Pennies=373.06 Some=(pennies%100)/10 Some7.306 More and some are integers so values get truncated Output: Keeping all the change, 37 you can buy pieces. Keeping only the coins, 7 you can buy pieces. 2.52 Output: f(a) = 41.00 for a = 6.50 f(a) = 47.10 for a = 4.90 f(a) = 29.20 for a = 2.10...
View Full Document

This note was uploaded on 10/09/2011 for the course ENGR 1 taught by Professor X during the Fall '07 term at Lehigh University .

Ask a homework question - tutors are online