/* 1 PROGRAM TO CALCULATE ARITHMETIC MEAN FOR INDIVIDUAL SERIES */


 /* 1 PROGRAM TO CALCULATE ARITHMETIC MEAN FOR INDIVIDUAL SERIES */

#include<stdio.h>

int main()

{

int i,n,x[10];

float sum=0,AM=0;

printf("Enter No. of observations:-\t");

scanf("%d",&n);

printf("Enter the values:-\t");

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

{

printf("\n");

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

sum=sum+x[i];

}

AM=sum/n;

printf("The Arithmetic Mean is:-\t");

printf("\n sum= %f",sum);

printf("\n AM=%f",AM);

return 0;

}

/* OUTPUT:-

Enter No. of observations : -      5

Enter the values:-

11

22

33

44

55

The Arithmetic Mean is:-

 sum= 165.000000

 AM=33.000000 */

                                                                        ðŸ˜ŠðŸ˜€ðŸ˜šðŸ‘€

                                                




                                                                     

No comments:

Post a Comment

This Blog helps you to learn basics to high level programming coding and practicals.
conceptual understanding

c program, Advance coding, c++ program, simple program, Advance language

online quiz Application project page MCA final year project

  Here we making a quiz application ppt presentation for college project so that our project idea will like to our professor and teacher  fi...