First create a set of tokens.
The easiest way to parse (most of the other MVPs will probably tell you this is a bad technique) is to use strtok to break up the input string, using space as a separator.
Initially assume that you are not going to get any syntax errors and that the user will input all values correctly and they will only input integers.
Using the first character, convert the string into a token. If it is a digit, convert it to a number. Try that to start with, see how you get on.
If you manage it then try floating point numbers.