In your Calculate method there is not need to create and initialize the variable again. You simply have to do r++ which is the equivalent to doing r = r + 1 or r += 1 they all do the same thing. Also like mentioned in my previous post you will want to make sure that r does not go past the array's size in this case it is 10. What happens when the user enters 10 different calculations and they decide to enter an 11th one?