I'm currently teaching myself C++ reading books, watching videos etc, been doing it about a week now and im trying to make myself a calculator, I've managed to make it so it has a title menu, and you type the number next to the option you want, I have option to add, subtract, divide, and multiply.
I'm happy with it so far, but I want it so after you select an option, it asks you how many number you wish to add, then you can add more than just the two numbers together, (which is what its like now).
I was convinced I could figure it out, using similar code to the first menu, but I just cant figure it out! been at it a couple of days now, and got nowhere.
Would really appreciate some input on how i can get it to work, if you need to see the code just ask and ill post it.
You will need to have an array to hold the amount of numbers. Then you can iterate through the array to use the numbers the user entered.
If it were me, I would just have the user keep entering numbers until he enters a letter or something. And every time a new number was entered, I would just add/subtract/multiply/divide it from the resulting answer.