This programm was a little bit difficult but I read other posts and read and I succes by making the programm work.<\/p>\n
#include <iostream>
\n#include <vector>
\n#include <math.h>
\nusing namespace std;<\/p>\n
void promedio(vector <int> prom){
\nint x;
\ndouble y=0;
\ncout <<“Escribe los valores que deseas calcular” << endl;
\ncout <<“Escribe -1 cuando no desees seguir calculando” << endl;
\ncin >> x;
\nwhile (x != -1){
\nprom.push_back(x);
\ncin >> x;}
\ndouble suma;
\nfor (int i = 0; i<prom.size(); i++){
\nsuma = suma+prom[i];
\n}
\ncout << “La suma total es ” << suma << endl;
\nint z=prom.size();
\ny= (suma)\/(z-1);
\ncout << “El promedio es ” << y << endl;
\ndouble b;
\nz=prom.size()-1;
\nint i=0;
\nwhile (i<z){
\nb= b+(prom[z]-y)*(prom[z]-y);
\ni=i+1;
\nz=z-1;
\n}
\nb=b*2;
\nint g= prom.size()-1;
\ncout << “La desviacion estandar es “;
\ndouble d;
\nd = sqrt(b\/g);
\ncout << d << endl;}<\/p>\n
int main(){
\nvector <int> prom(1);
\npromedio(prom);
\nreturn 0;
\n}<\/p>\n