Fred Tom Jenny and Sarah pooled their money and purchased a
     Fred, Tom, Jenny and Sarah pooled their money and purchased a packet of jellybeans.  Tom received twice as many jellybeans as Fred while Sarah received tour less than Tom. Jenny was given a third of the number of jellybeans that Sarah received.  How many jellybeans did each of the children receive if there were 40 jellybeans in the packet? 
  
  Solution
Let Fred has x jellybeans.so tom has 2x , sarah has 2x-4 , jenny has (2x-4)/3 jellybeans.since they total have 40 jellybeans then
x + 2x + (2x-4) + (2x-4)/3 = 40
=> 3x+4(2x-4)/3=40
=>17x-16=120
=>x=136/17=8
so fred has 8,tom has 16,sarah has 12 & jenny has 4 jellybeans.

