I know this isn't what anyone wants to hear but if you keep giving riz09 completed code he'll keep being dependent instead of learning for himself how to program. This is a REALLY EASY task he should have been able to figure out for himself.

riz09: by all means ask for help, but completed examples don't help you. When you get to the exam where you can't ask on go4expert, you'll be completely stuck and will fail the exam. Have a go instead of posting here, and ask for help with what you're stuck on.

The problem of course is that your assignments will get increasingly difficult so you need to break this dependency cycle as soon as possible.