Advertisement
aperles

Untitled

Feb 18th, 2014
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. void main() {
  2.     int cantidad, i;
  3.     double *p, *p2;
  4.     double m, v;
  5.  
  6.     print("Introduce que cantidad de numeros vas a introducir:/n");
  7.     scanf("%d",&cantidad);
  8.     p=(double*)malloc(sizeof(double)*cantidad);
  9.     p2=p;
  10.     for(i=0;i<cantidad;i++){
  11.         print("/nIntroduce un numero:/n");
  12.         scanf("%lf",p2);
  13.         p2++;
  14.     }
  15.     m = media(p,cantidad);
  16.     v = varianza(p,cantidad);
  17.     free(p);
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement