MIllis , int not refresh value

Since you're here, and I'm using your code, could you help? :wink:

It was, indeed, my code originally and it did exactly what you asked. Then you changed the scope of what you wanted to do, hence my suggestion to post here rather than PM me again.

As has been said, you need to change the values in the array based on user input. So, in your program instead of

    if (input == "+")
     {val2=3000;

etc change the value in the array instead. If you do not know how to do it then you will learn something from a little research.

As Paul said, there is no reason to have the val1 and val2 variables in the program.