I want to know what the code for basic calculator. I want to know more about the operator "*+-/". What if I enter the first number, and then add it to a second number then add it again to a next number. When I click the + sign the second time it will display the result of the first two number then get ready to add another number and so on and so forth.
Is this a program you're writing? If so, you can decide what you want it to do, and make it do it. Your question isn't very clear and, quite honestly, I don't know how to answer it because I don't understand the question. Can you give me a complete example.
In the Windows calculator program, there is a hidden "accumulator". When you hit "C", it clears (zeroes) the accumulator. You type in a number, and then press a function. The value in the accumulator will be multiplied by (*), divided by (/), added to (+), or subtracted from the accumulator. The result will be stored in the accumulator for the next operation. The number you originally entered appears to stay on the display until you enter another number, but it's not actually used for anything once you press (*/+-). When you hit "=", the value in the accumulator is displayed.