Guys my code is working fine in Ideone but here it is giving runtime error. Can anybody help
Please refer to this FAQ. It should help you for most cases.