#include
using namespace std;
int main ()
{
int y[10], n, i, max, min;
cout<<"\n N="; cin>>n;
for (i=0; i
{
cout<<"\n Y["<<i<<"]=";<br>cin>>y[i];
}
min=y[0];
max=0;
for (i=0; i if ( max {
max = y[i];
}
if ( min>y[i] )
{
min = y[i];
}
}
cout << "Summa max i min = " << max+min << endl;<br>system("pause");
return 0;
}