1) var i,n,k:integer; a:array[1..10] of integer; begin for i:=1 to 10 do read(a[i]); writeln; for i:=10 downto 1 do write(a[i],' '); readln; readln end. 3) var i,n,k:integer; a:array[1..10] of integer; begin for i:=1 to 10 do read(a[i]); writeln; writeln((a[5]+a[6])/2:0:2); readln; readln end. 4) var i,n,k,min:integer; a:array[1..10] of integer; begin for i:=1 to 10 do begin read(a[i]); if (a[i] mod 10=4) or (a[i] mod 10=-4) then min:=a[i];
for i:=1 to 10 do if ((a[i] mod 10=4) or (a[i] mod 10=-4)) and (a[i]<min) then min:=a[i]; writeln(min); end.
5) var i,n,k,max:integer; a:array[1..10] of integer; begin max:=0; for i:=1 to 10 do begin read(a[i]); if (a[i] mod 5=0) and (a[i]>max) then max:=a[i]; end; writeln(max); end.
#include <iostream>
#include<ctime>
using namespace std;
int main()
{
setlocale(LC_ALL, "ru");
srand(time(NULL));
const int SIZE = 11;
int arr[SIZE];
const int SIZE2 = 1;
int arr2[SIZE2]{};
int arr3[SIZE2]{};
for (int i = 0,j=0,d=0; i < SIZE; i++)
{ arr[i] = rand() % 51-25;
if (arr[i] < 0) { arr2[j] = arr2[j] + arr[i]; }
if (arr[i] > 0) { arr3[d]= arr3[d]+ arr[i]; }
if (i == 10)
{ cout << "Сумма отрицательных элементов массива = " << arr2[j] << endl;
cout << "Сумма положительных элементов массива = " << arr3[d] << endl; }
}
system("pause");
return 0;}
var i,n,k:integer;
a:array[1..10] of integer;
begin
for i:=1 to 10 do
read(a[i]);
writeln;
for i:=10 downto 1 do
write(a[i],' ');
readln;
readln
end.
3)
var i,n,k:integer;
a:array[1..10] of integer;
begin
for i:=1 to 10 do
read(a[i]);
writeln;
writeln((a[5]+a[6])/2:0:2);
readln;
readln
end.
4)
var i,n,k,min:integer;
a:array[1..10] of integer;
begin
for i:=1 to 10 do
begin
read(a[i]);
if (a[i] mod 10=4) or (a[i] mod 10=-4)
then min:=a[i];
for i:=1 to 10 do
if ((a[i] mod 10=4) or (a[i] mod 10=-4)) and (a[i]<min)
then min:=a[i];
writeln(min);
end.
5)
var i,n,k,max:integer;
a:array[1..10] of integer;
begin
max:=0;
for i:=1 to 10 do
begin
read(a[i]);
if (a[i] mod 5=0) and (a[i]>max)
then max:=a[i];
end;
writeln(max);
end.