Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <conio.h>
- #include <math.h>
- int main(void)
- {
- float x, y, z,e=0, a=0, b=0,c=0;
- printf("Enter a number to determine how many numbers you want to add.\n");
- scanf("%f", &x);
- printf("Enter %.2f values.\n", x);
- for(;y<x;y++)
- {
- scanf("%f",&z);
- e= e +z; //arithmetic mean (mean - var 1)
- }
- e= e/x; //arithmetic mean.
- for (;c<x;c++)
- {
- a=pow((z-e),2);
- }
- b=sqrt(a);
- printf("Arithmetic Mean is: %.2f\n", e);
- printf("Variance is %.2f\n", a);
- printf("Standard Deviation is %.2f\n", b);
- getch();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement