#include <iostream>
#include <iomanip>
#include <time.h>
#include <stdlib.h>
using namespace std;
int main(){
setlocale(LC_ALL,"russian");
srand(time(NULL));
int sum=0;
int sredne;
const int N = 10;
int i;
int array[N];
for( i=0;i<N;i++ )
{
array[i]=rand() % 50;
cout << setw(5) << array[i];
}
cout<<endl;
sum+=array[i];
sredne=sum;
sredne=sum/N;
cout << " Среднее арифметическое: "<< sredne<< endl;
#include <iostream>
#include <iomanip>
#include <time.h>
#include <stdlib.h>
using namespace std;
int main(){
setlocale(LC_ALL,"russian");
srand(time(NULL));
int sum=0;
int sredne;
const int N = 10;
int i;
int array[N];
for( i=0;i<N;i++ )
{
array[i]=rand() % 50;
cout << setw(5) << array[i];
}
cout<<endl;
for( i=0;i<N;i++ )
{
sum+=array[i];
sredne=sum;
sredne=sum/N;
}
cout << " Среднее арифметическое: "<< sredne<< endl;
}