The program shows correct output but it doesn't matches second condition . What is the error in the program ?