#include "pch.h"
#include
#include
#include
#include
using namespace std;
int main()
{
setlocale(LC_ALL, "rus");
int N,i,j;
cout
cin >> N;
float **array = new float*[N];
for (i = 0; i < N; i++)
{
array[i] = new float[N];
}
srand(unsigned int(0));
for (i = 0; i < N; i++)
{
for (j = 0; j < N; j++)
{
array[i][j] =float(rand()%10+1)/float(rand()%10+1);
cout
}
cout
}
float *array1 = new float[N*N];
int c = 0;
cout << "\nЭлементы заштрихованной области: "<< endl; </p>
for (i = 0; i < N;++i )
{
for (j = i; j < N -i; j++)
{
array1[c] = array[i][j];
cout
c++;
}
for (j = i; j >= N -i-1; j--)
{
array1[c] = array[i][j];
cout
c++;
}
}
cout
int c1 = c;
float min = array1[0];
for (c = 1; c < c1; c++)
{
if (array1[c] < min)
{
min = array1[c];
c++;
}
}
cout
for (i = 0; i < N; i++)
delete[]array[i];
delete[]array1;
cout
system("pause");
return 0;
}