This week's book giveaways are in the Java EE and JavaScript forums. We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line! See this thread and this one for details.

6 ostriches and 11 pigs. The Math: x = # of ostrich legs, x/2 = # of ostriches y = # of pig legs, y/4 = # of pigs x + y = 56 x/2 + y/4 = 17 y = 56 - x x/2 + (56 - x)/4 = 17 4(x/2 + (56 - x)/4) = 4 * 17 2x + 56 - x = 68 x = 12 y = 56 - 12 = 44 x/2 = 6 y/4 = 11 [ September 10, 2003: Message edited by: Jason Menard ]

HS Thomas
Ranch Hand

Joined: May 15, 2002
Posts: 3404

posted

0

Congrats. I did it the usual (longer) way using math. Here is a solution that uses pure logic. Each animal has two hind legs, so 17 heads means 34 hind legs total. The remaining 22 legs must be the front legs of 11 four-legged pigs. Therefore 11 heads belong to the pigs and the remaining 6 heads belong to ostriches. regards