Instead of comparing integers with '<' and '>', compare strings with strcmp().
But i'm not sure how or where to insert strcmp into the code.