Hopefully I attached my code snippet, Whats wrong in my code. Can anyone please give a solution with explanation ?