菜鸡抄代码GetVariance
Today I only did a meaningful thing,which was a mathermatic speech.
The Data scientist is an old m
这好像是总体标准偏差,并不是方差(Variance),方差不开根号的
你的scanf中的格式符有点问题
scanf("%lf", &x[i]);
scanf中lf对应double *,用f会降级为float *的,精度有可能会丢失
不过printf中就随便了,默认按double输出
参考scanf, fscanf, sscanf, scanf_s, fscanf_s, sscanf_s - cppreference.com