#include <iostream.h>
#include <conio.h>
#include <math.h>

void leer (float valores[10]);
float promedio (float valores [10]);
float varianza (float valores[10]);

main()
{
float valores[10];
 clrscr();
 leer (valores);
 cout<<endl;
 cout<<"EL PROMEDIO ES: "<<promedio(valores)<<endl<<endl;
 cout<<"LA VARIANZA ES: "<<varianza(valores)<<endl;
 getch();
}

void leer (float valores[10])
{
 int i;
 for (i=1; i<=10; i++)
 {
  cout<<"TECLEA EL VALOR: "<<i<<endl;
  cin>>valores[i];
  }
 }

 float promedio (float valores[10])
 {
  int i, suma=0, total;
  for (i=1; i<=10; i++)
  {
   suma += valores[i];
  }
  total = suma/10;
  return total;
 }

 float varianza (float valores[10])
 {
  int i, oper=0, resul;
  for (i=1; i<=10; i++)
  {
oper += (valores[i]-promedio(valores))*(valores[i]-promedio(valores));
  }
  resul=oper/10;
   return resul;
  }
