....edited by moderator



Try the above code u will get correct output

Try commented one also..................