The extraction operator knows that when inputting values into an int that only "numbers" are allowed. The stream doesn't error out unless the first character is a non-number. It stops processing the variable when it encounters the first non-number. It will then extract one character, any character will do, then proceeds to the next integer value again stopping at the first non-number.
But remember if the user enters 1.0 - 2.0 your program will not function properly because a decimal point is not a valid entry for an int.
You really should have a final else statement in case op is not a '-' or '+' char, and you should probably initialize result to some value when you declare it.