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

Assignment Help:

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


Related Discussions:- C program to add, average and deviation of numbers

Why php is also known as scripting language, Why PHP is also known as scrip...

Why PHP is also known as scripting language? PHP is fundamentally a general purpose language, which is used to write scripts. Scripts are normal computer files which comprises

Differentiate between functions getch () and getche (), Differentiate betwe...

Differentiate between functions getch () and getche (). - Both functions accept a character input value from user. - When getch () is used, key that was pressed won't appear

Write a c program to input three real numbers, Write a C program to input t...

Write a C program to input three real numbers and  print them out as follows : The first variable is ....... and the second one is ...... The last variable is .......... T

Load catalogue from file, Implement a menu driven real estate catalogue sys...

Implement a menu driven real estate catalogue system that allows users to perform various catalogue maintenance and search tasks.  You are only allowed to use the C programming la

Define scope rules of c program - computer programming, Define Scope Rules ...

Define Scope Rules of C program - Computer Programming? The fundamental rule of scope is that identifiers are accessible only within the block in which they are declared and th

Friend function, Ask question #Minimum 100 what is friend function is used ...

Ask question #Minimum 100 what is friend function is used in c++

Minimum shelf, At a shop of marbles, packs of marbles are prepared. Packets...

At a shop of marbles, packs of marbles are prepared. Packets are named A, B, C, D, E …….. All packets are kept in a VERTICAL SHELF in random order. Any numbers of packets with thes

basic salary of employees & calculate net salary, basic salary of employee...

basic salary of employees & calculate net salary in C++ Programming

C program to display a rectangle, Aim: To implement a program to display a...

Aim: To implement a program to display a rectangle, circle and triangle. Code:                       class shape {             public:                         vir

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd