cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
General C++ Programming
Sigma of a single Variable with differen
Sigma of a single Variable with different values?
Jun 8, 2015 at 8:32am UTC
mpdezfouli
(1)
Hello all
My problem is that I have a variable that in an step by step program gives different values in each step, now I have to sum all this values as a new variable but I can not do it.
Please Help
Jun 8, 2015 at 10:23am UTC
MikeyBoy
(5631)
Create a new variable to hold a running total of the variables.
At each step, add the current value to the running total.
Once all steps are complete, you'll have your sum.
Topic archived. No new replies allowed.