As far I know there is no way to avoid a newline character in scanf statement. However you can use an alternative way instead. use getche() It will take input but not wait for user to hit the enter key.
Code goes like this:
1 2 3
a=getche()-'0';//convert char to integer value,subtracting ascii value of 0 from it
op=getche();//read a char as an operator
b=getche()-'0';//convert char to integer value,subtracting ascii value of 0 from it