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

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

void main()
{
    int n,a[100];
    clrscr();
    cout<<"How many numbers = ";
    cin>>n;

    int sum=0;
    for(int i=0;i<n;i++)
    {
       cout<<"\na"<<"["<<i+1<<"] = ";
       cin>>a[i];
       sum=sum+a[i];
    }

    cout<<"\nAverage of Arrays element = "<<(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.........