Use fgets to read a line of input from the user (use stdin as the file pointer). Then you can parse the input to your heart's content.