Why are all test cases not coming correct?

What is the problem in my code? Please explain