Write a program that read & display average (2).

#include<stdio.h>
#include<conio.h>

void main()
{
    int n,i,a[100],sum=0;
    clrscr();
    printf("How many numbers = ");
    scanf("%d",&n);

    for(i=0;i<n;i++)
    {
       printf("\na[%d] = ",i+1);
       scanf("%d",&a[i]);
       sum=sum+a[i];
    }

    printf("\nAverage of Arrays element = %f",(float)sum/n);

    getch();
}

///////////////////////////////////////////////////////////////////////////
Copy & paste this code in your TC & run, then you will get output.......
If you have any problem please comment below.........