Geeta,
I formatted your code by enclosing it inside Code Tags. You can easily do it yourself by using the # Button on the Editor menu Bar.
You can click the button and paste or type your code in between the inserted code tags, or you can select any existing code and then click the button.