What values are you putting in that are causing specific trouble with subtraction? I can see there being trouble there (and in division) if the two numbers entered are the same.
I'm curious why you are prompting for user input into the answer variable right after you output the solution?
The calculator is running in an infinite loop because there's no way to make the while condition statement while(way != 5) to equal 5. Edit - do you mean for them to be able to enter new numbers and do another calculation?
Another thought on division - with integer values you're going to get integer division, which may not be the result the user is expecting. And checking to see what number is larger to determine how you do the division may not be what the user is expecting either. If the first number I enter is 1 and the second 3 - I'm expecting 1/3 = .33333 etc. The code right now would give me 3/1 = 3.