you can use string tokenizer for this program to make it simplify...[:))]