I am trying to calculate standard deviation of all the elements in a vector, so far I have:

But when I run this I get something like:Code:double x; double squared_sum; double squared; for (int i = 0 ; i < num.size () ; i++ ) { x = num[i] - mean; // mean = 4.2857 squared = x*x; squared_sum += squared; } cout << "squared_sum" << x << endl;squared_sum.#INF

What seems to be the problem and haw can I fix this?

The numbers in the vector are: 2 5 3 2 10 1 7