This program accepts n numbers as input and find's average of n numbers.The user is first prompted to enter n number.These n numbers
are stored in single dimensional array.The sum of these numbers is stored in
variable sum.Later this sum is divided by n to get the ** average
of n numbers ** .

#include < stdio.h > #include < conio.h > void main() { float a[20],sum,avg; int n,i; clrscr(); printf("\nEnter n : "); scanf("%d", &n); printf("\nEnter %d numbers \n",n); for(i=0;i < n;i++) { scanf("%f", &a[i]); } sum = 0; for(i=0;i < n;i++) { sum += a[i]; } avg = sum / n; printf("\nEntered %d numbers are \n",n); for(i=0;i < n;i++) { printf("\n%.2f",a[i]); } printf("\nThe average of numbers is %f",avg); } // main