Ask Question

Name:
Title:
Your Question:

Answer Question

Name:
Your Answer:
User Submitted Source Code!


Description:
  ave
Language: C/C++
Code:
#include<stdio.h>
#include<math.h>
int main {
    printf("please enter the number of datan");
    int n,i;
    float s=0,f=0,b=0,ave;
    int a[100];
    scanf(%d,&n);
    for(i=0;a[i]!= '=';i++){
        scanf(%f,&a[i]);
        s=s+a[i];
        }
    ave=s/n;
    for(i=0;a[i]!='/0';i++){
        f=f+pow((ave-a[i]),2);
        }
    f=f/n;
    b=sqrt(f);
    printf("the average value is %.6fn",ave);
    printf("the variance is %.6fn",f);
    printf("the Standard Deviation is %.6fn",b);
    
}
          
          
Comments: