#include <iostream>
using namespace std;
void main(void){
setlocale(LC_ALL, "rus");
int n,i,sum=0,r;
cout << "Enter number pls";
cin >> n;
int *arr = new int[n];
for (i = 0; i < n; i++){
cout << "Pls enter" << " " << i << " " << "element";
cin >> arr[i];
}
sum = sum + arr[i];
delete[] arr;
r = sum / n;
cout << "Среднее равно"<< " " << r;
#include <iostream>
using namespace std;
void main(void){
setlocale(LC_ALL, "rus");
int n,i,sum=0,r;
cout << "Enter number pls";
cin >> n;
int *arr = new int[n];
for (i = 0; i < n; i++){
cout << "Pls enter" << " " << i << " " << "element";
cin >> arr[i];
}
for (i = 0; i < n; i++){
sum = sum + arr[i];
}
delete[] arr;
r = sum / n;
cout << "Среднее равно"<< " " << r;
}