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
We move a high quantity of large Video files (200mb - 2 GB each) across the internet. We have a Linux server (ubuntu) hosted in a datacenter (1Gbps) operating an FTP server. Our

A body which has three forces acting on it is in equilibrium. One force is 3N to the North and the other is 4N to the west. What us the magnitude and direction of the third force?

to compute the net pay of an emplyee, given his/her pay rate, number of hours and tax rate

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


requiredrequiredrequiredrequiredrequiredrequiredrequiredrequired

c-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   #include float start_point, /

You are to implement a code cracking system. The system will deploy four processes (p1,p2,p3 & p4) to try to guess the password of an encrypted code. For encryption, we consider th

calculate the total resisitance of a series circuit?

The files are meteorological radar data whose decompression is badly needed for relative study. Please contact Kathy Lee (Email: ; Cell phone: 0086 15701799056) or Mr. Zhu (Email: