aspose file tools*
The moose likes Programming Diversions and the fly likes Pigs in pens Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Other » Programming Diversions
Bookmark "Pigs in pens" Watch "Pigs in pens" New topic
Author

Pigs in pens

HS Thomas
Ranch Hand

Joined: May 15, 2002
Posts: 3404
A farmer has nine pigs . Can she put them in 4 pens so that there is an odd number of pigs in each pen ?

Simple but nasty!
regards
[ August 18, 2003: Message edited by: HS Thomas ]
Rafael Prado
Ranch Hand

Joined: May 17, 2003
Posts: 33
HS Thomas
Ranch Hand

Joined: May 15, 2002
Posts: 3404
Good start. Where is the 4th pen ? A bit too conservative on pens, I think.
Rafael Prado
Ranch Hand

Joined: May 17, 2003
Posts: 33
The 4th pen is the outside one, which gets 9 pigs (odd number).
Didn't that count?
[ August 18, 2003: Message edited by: Rafael Prado ]
HS Thomas
Ranch Hand

Joined: May 15, 2002
Posts: 3404
OK, I concede the outer square is the 4th pen. Just checking!

In case anyone trying to count the pens.
regards
[ August 18, 2003: Message edited by: HS Thomas ]
Jim Yingst
Wanderer
Sheriff

Joined: Jan 30, 2000
Posts: 18671
Or:


"I'm not back." - Bill Harding, Twister
HS Thomas
Ranch Hand

Joined: May 15, 2002
Posts: 3404
Those are well-penned pigs ,Jim.
Or, if you want to maintain a hierarchy : Pigs like that . Re: The Animal Farm by George Orwell.


[ August 18, 2003: Message edited by: HS Thomas ]
HS Thomas
Ranch Hand

Joined: May 15, 2002
Posts: 3404
Or:
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Pigs in pens