The way it usually works is: you show us the code you've tried, and explain how the result you got was different from the result you really wanted. This doesn't sound like such a difficult puzzle to work out, so try something, and if it doesn't work, show us.