I wrote my Java Calculator using Swing function. Just created its base model and made basic arithmetic functions working. now I got stuck into one problem. Addition, subtraction, division and multiplication everything is working. But the problem is I cant do any operations more than two numbers at a time, Like if I want to subtract 5-4-2,it doesn't working. 5-4 is working, after the result i have again press - 2 again to make it work. Somehow I solved that in Addition but the other three operators are not working yet. Can anyone tell me a way to add at least Five numbers at a time to do mathematical operations ?
I wrote my Java Calculator using Swing function. Just created its base model and made basic arithmetic functions working. now I got stuck into one problem. Addition, subtraction, division and multiplication everything is working. But the problem is I cant do any operations more than two numbers at a time, Like if I want to subtract 5-4-2,it doesn't working. 5-4 is working, after the result i have again press - 2 again to make it work. Somehow I solved that in Addition but the other three operators are not working yet. Can anyone tell me a way to add at least Five numbers at a time to do mathematical operations ?