Answer to May 31, 2004 Problem
|
---|
7-11 Problem |
---|
What are the exact costs of each item? |
---|
Solution to the Problem: The prices are: $1.20, $1.25, $1.50, and $3.16
Let's begin by representing the problem with a pair of equations. If x,y,z,w represent the amounts of the four items in cents then we have
x y z w = 711000000 What can we say so far? The factors : 711 = (1)(3)(3)(79)
If there is to be an exact solution then the product xyzw must be divisible by 3, 9, 79.
SOLUTION #1 (exact solution)
SOLUTION #2 (rounds correctly)
SOLUTION #3 (rounds correctly) ----------------------------------------------------------------
Mikael Wetterholm sent in the following:
CLS sum = 711 'sum in cent product = 711000000 'product in cent a = 100' I suggested that the cost of an item was greater than 100 cent PRINT "wait..." DO WHILE a < sum b = 100 a = a + 1 DO WHILE b < sum c = 100 b = b + 1 DO c = c + 1 d = sum - (a + b + c) IF a * b * c * d = product THEN GOTO final LOOP WHILE d > 100 LOOP LOOP END final: a = a / 100 'convert to dollar b = b / 100 c = c / 100 d = d / 100 SOUND 1000, 10 PRINT "$"; a; "$"; b; "$"; c; "$"; d; END Dave Smith also wrote a computer program to solve the problem. |
1. Jeffrey Gaither | Winchester, Virginia |
2. Richard Johnson | La Jolla, California |
3. James Alarie | University of Michigan -- Flint Flint, Michigan |
4. Mikael Wetterholm | Danderyd, Sweden |
5. Dave Smith | Toledo, Ohio |
6. Bella Patel | Harrisonburg, Virginia |
7. Helna Patel | Harrisonburg, Virginia |
8. Andrew Oliver | Winchester, Virginia |
9. Chris Maggiolo | Harrisonburg, Virginia |