0 04 57 45 35 40 27 42 285 55 36 15 18 06 135 35

0 04 57 45 35 40 27 42 285 55 36 15 18 06 135 35

This preview shows page 3 - 6 out of 6 pages.

2.0, 0.4, 5.7, 11.2, 1.6, 1.0, 4.5, 3.5, 4.0, 2.7, ������ 4.2, 28.5, 21.2, 4.5, 13.6, 5.5, 3.6, 1.5, 1.8, 0.6, 12.1, ������ 2.7, 1.5, 13.5, 3.5, 2.1, 3.9, 5.3, 2.5, ������ 4.0, 4.3, 5.4, 3.8, 2.0, 3.6, 3.8, 1.5, 4.0, 0.0, 2.9, ����� 3.5, 0.4, 3.0, 3.8, 3.3, 0.6, 3.9, 2.1, 2.3,3.7, 3.3, ����� 0.1, 1.8, 9.6, 9.2, 2.0, 6.4, 6.2, 7.0, 0.7, 3.4, 5.3, ������ 2.0, 1.2, 0.2, 9.6, 8.7, 0.3, 4.4, 4.0, 3.2, 0.5, 0.7, 4.0, ������� 3.5, 9.2, 2.2, 10.0, 0.4, 7.2, 12.4, 18.2, 6.1, 3.5, 5.5, ������� 5.1, 3.0, 10.9,
2.3, 2.5, 3.6, 4.4, 0.7, 3.8, 0.1, 8.6, 5.4, 2.6, ������� 9.2, 0.6, 2.0, 9.8, 7.3, 16.1, 5.2, 6.2, 7.0, 4.7, 1.1, 8.1, 22.6, 0.9, ����� 4.2, 6.8, 0.9, 3.4, 2.8, 2.9, 9.2, 14.6, 7.6, 16.6, 2.5, 9.9, ����� 0.2, 1.6, 2.3, 2.9, 5.2, 1.2, 1.9, 2.9, 6.8, 1.4, 6.1, 3.6, ����� 3.6, 2.3, 12.3, 2.4, 5.3, 11.5, 14.9, 4.9, 1.6, 4.1, ������ 4.9, 2.5, 3.9, 4.2, 8.7, 7.2, 4.6, 3.4, 1.1, 5.8, 1.8, 9.3, ������� 3.7, 6.4, 18.1, 8.7, 4.5, 1.9, 3.1, 3.5, 0.6, ������� 16.6, 9.5, 2.5, 7.9, 13.1, 6.7, 2.7, 1.8, 1.8, 2.6, ������� 11.9, 8.2, 2.7, 5.2, 2.3, 8.6, 3.9, 0.9, 6.1, 3.9, 1.5, ������� 0.7, 2.1, 0.2, 2.9, 0.9, 3.9, 6.4, 1.9, 6.1, ������� 10.6, 11.4, 9.9, 4.3, 10.0, 5.5, 3.6, 3.0, 0.7, 2.4, ������� 0.9, 3.3, 2.9, 9.2, 6.5, 3.8, 5.5, 3.1, 6.1, 2.9, 1.5}; double *ptr; ptr = H; average=mean(*ptr,400); var=standardd(*ptr,400,average); sd=sqrt(var); printf("The average is %.2f\n",average);
printf("The standard deviation is %.2f\n",sd); printf("The variance is %.2f\n",var); getch(); return 0; } double mean(double *ptr,int n) { int i; double sum=0; for(i=0;i sum= sum+(*ptr); return sum/n; } double calc(double x,double avg) { double temp; temp=x-avg; return temp*temp; } double standardd(double *ptr,int n, double average) { double mean,sum=0; int i; for(i=0;i sum+=calc(*ptr,average); mean=sum/n; return mean; }

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture