#include<iostream>
using namespace std;
int main()
{
    int sum=0,avg=0,i,a,n;
    cout<<"enter the number of you reduired"<<endl;
    cin>>n;
    for(i=0;i<n;i++)
        {
            cout<<"enter the numbers"<<i+1<<endl;
            cin>>a;
            sum=sum+a;
        }
    avg=sum/n;
cout<<"avg of numbers is"<<avg;
}

Embed on website

To embed this program on your website, copy the following code and paste it into your website's HTML: