The final day of June. We've come so far!
Today's problem will prove super useful when ordering pizza. Write a function that takes in an int (diameter of a circle) and a float (price) and determine the cost per unit of area (price/area). Next time you order a pizza you can plug in the sizes and prices and determine which is the better buy.
Comments:
Emre Ozdemir - 10 years, 5 months ago
reply permalink
Anonymous - 10 years, 5 months ago
reply permalink
Anonymous - 10 years, 5 months ago
Oops. That should be:
square_inches = 3.14159 * (size/2.0)**(2.0)
size not price :/
reply permalink
Anonymous - 10 years, 5 months ago
Haskell solution
reply permalink
bumbleguppy - 10 years, 5 months ago
javascript
reply permalink