trying to add numbers using functions.

I just need a little help this is something i dont think is too complicated.
I am using borland turbo c++.
I am going to have three functions; total, add and subtract.
total needs to start off showing a zero total when it is initially called by the either one of the other two functions. When total is called by add function, the user will add a number to the total, and can add as many times as they want, the new number should be returned to total and when this function is called by subtract it will show the updated value of total.
ideally i would want it to look like this when the function total is called in add;
total = 0
how much to add? (user inputs value)

total= (changes as the user adds);

need to know how i can do this;

thanks for the help in advance
sorry mate, but nobody can give u a code, but if u post one of urself that doesnt work, we'll help u
thanks, i am trying to teach my self so i dont need a code, but if someone could tell me what i should read about to learn something like this, i have used some sources and read up on functions but i did not see how to do this. I guess i need to know what topics i could learn something like this from.
Keep looking at the functions pages...they tell you what you need to know. (HINT: look for return values/parameters)
thanks, i will look harder
Topic archived. No new replies allowed.