Use a switch instead of successive if (strcmp()) statments.