C program to calculate arithmetic mean.

#include<stdio.h>
#include<conio.h>
void main()
{
 clrscr();
 int n, i, arr[50], sum=0;
 printf("How many number you want to enter ?\n");
 scanf("%d",&n);
 printf("Enter %d Numbers :",n);
 for(i=0; i<n; i++)
 {
  scanf("%d",&arr[i]);
  sum=sum+arr[i];
 }
 int armean=sum/n;
 printf("Arithmetic Mean = %d",armean);
 getch();
}
C program to calculate arithmetic mean. C program to calculate arithmetic mean. Reviewed by on December 22, 2019 Rating: 5

No comments:

Powered by Blogger.