const int size = 5;
int a[size] = { 43, 12, 5, 68, 35 };
int max = a[0];
int min = a[0];
for (int i = 1; i<size; i++)
{
cout << "Max = " << max << "\n\n";
cout << "Min = " << min << "\n\n";
int a[size] = { 43, 12, 5, 68, 35 };
int max = a[0];
int min = a[0];
for (int i = 1; i<size; i++)
{
if (min>a[i])}min = a[i];if (max<a[i])max = a[i];
cout << "Max = " << max << "\n\n";
cout << "Min = " << min << "\n\n";
Комментариев нет:
Отправить комментарий