C program to add, average and deviation of numbers, C/C++ Programming

C program to add, average and deviation of numbers:

void main()

{

                int sum=0,a[10],i;

                float avg=0,dev,vari=0,var;

                printf("Enter 10 interger \n");

                for(i=0;i<10;i++)

                {

                                scanf("%d",&a[i]);

                                sum=sum+a[i];

                }

                avg=sum*0.1;

                for(i=0;i<10;i++)

                                var=var+pow((a[i]-avg),2);

                vari=var/10;

                dev=sqrt(vari);

                printf(" Sum = %d \n Avrage= %f \n Variance = %f \n Deviation = %f \n",sum,avg,vari,dev);

 

                getch();

 

}

1957_C program to add, average and deviation of numbers.png

Posted Date: 9/29/2012 7:30:35 AM | Location : United States







Related Discussions:- C program to add, average and deviation of numbers, Assignment Help, Ask Question on C program to add, average and deviation of numbers, Get Answer, Expert's Help, C program to add, average and deviation of numbers Discussions

Write discussion on C program to add, average and deviation of numbers
Your posts are moderated
Related Questions
(a) Write a recursive procedure (digits n) that computes the number of digits in the integer n using a linear recursive process. For example, (digits 42) should return 2 and (digit

b) The static keyword let a variable to maintain its value among distinct function calls. If the value of a static variable alters while the variable has been accessed, variable


A: The procedure of encoding the parameter types along with the function/method name into a unique name is called as name mangling. The inverse procedure is called demangling. F

Define some features of external storage class in c program? The features of an external storage class variable are as follows: Storage - memory Default initial value -

world wide web


write a program to find the area under the curve y=f(x) between x=a & x=b

1)      Factorial (for this question just provide an answer for each part)  1.1  Debug the following program to calculate N! #include using namespace std; main()

Write a program to find the area under the curve y = f(x) between x = a and x = b, integrate y = f(x) between the limits of a and b. The area under a curve between two points can b