вот код:
var a,b,c,d,e,min,max: integer;
begin
read (a,b,c,d,e);
if (a> b) and (a> c) and (a> d) and (a> e) then max: = a;
if (b> a) and (b> e) and (b> c) and (b> d) then max: = b;
if (c> a) and (c> b) and (c> d) and (c> e) then max: = c;
if (d> a) and (d> c) and (d> b) and (d> e) then max: = d;
if (e> b) and (e> a) and (e> d) and (e> c) then max: = e;
if (a< b) and (a< c) and (a< d) and (a< e) then min: = a;
if (b< a) and (b< e) and (b< c) and (b< d) then min= b;
if (c< a) and (c< b) and (c< d) and (c< e) then min: = c;
if (d< a) and (d< c) and (d< b) and (d< e) then min: = d;
if (e< b) and (e< a) and (e< d) and (e< c) then min: = e;
writeln ('минимальное число: ',min);
writeln ('максимальное число: ',max);
end.
#include <conio.h>
#include <time.h>
using namespace std;
void main()
{
srand(time(NULL));
setlocale(0, "");
int arr[17];
int a, b, chet=0, nechet = 0;
cout << "Введите диапазон ." << endl << "Нижняя граница диапазона: "; cin >> a; cout << "Верхняя граница диапазона: "; cin >> b; cout << endl;
for (int i = 0; i < 17; ++i)
{
arr[i] = a + rand() % (b-a+1);
cout <<" "<<arr[i];
}
for (int i = 0; i < 17; ++i)
{
if (arr[i] % 2 == 0) chet++;
else nechet++;
} if (chet > nechet)
cout << " \n Четных больше";
else if (nechet>chet)
cout << "\n Нечетных больше";
else cout << "\n Одинаковое количество четных и нечетных";
_getch();
}