Typing speed calculator in C