Why are you doing their home work for them? Do you think none of the four people before you that gave hints how to do it know how? Come on man! We don't just give out the full working code. How are they supposed to learn anything that way? For that matter, why are you using '<=' for white space comparison? Use isspace if you really want to test for white space. That's what it's designed for. It takes local into account.
Quzah.