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
Trying calculations from file
Trying calculations from file
Oct 24, 2013 at 4:49am UTC
mjyz
(39)
///
Last edited on
Oct 26, 2013 at 4:13am UTC
Oct 24, 2013 at 2:42pm UTC
coder777
(8450)
on line 110:
avg
is always 0. You need to find the average before you use it in the formula
Oct 24, 2013 at 6:55pm UTC
mjyz
(39)
///
Last edited on
Oct 26, 2013 at 4:12am UTC
Oct 25, 2013 at 7:37am UTC
coder777
(8450)
Now the problem is that you calculate the average but not the sum deviations.
In other words: you need a loop for line 120. You can use a vector in order to store all
num
:
http://www.cplusplus.com/reference/vector/vector/?kw=vector
Topic archived. No new replies allowed.