why my coding cannot give the correct answer?

Printable View