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.
(№ 1328) 1
(№ 1327) -45
Объяснение:
(№ 1328) 1010101_2 - 201_8 + 2D_16
1010101_2 = 1 * 2^6 + 0 * 2^5 + 1 * 2^4 + 0 * 2^3 + 1 * 2^2 + 0 * 2^2 + 1 * 2^0 = 64 + 0 + 16 + 0 + 4 + 0 + 1 = 85_10
201_8 = 2 * 8^2 + 0 * 8^1 + 1 * 8^0 = 128 + 0 + 1 = 129_10
2D_16 = 2 * 16^1 + 13 * 16^0 =32 + 13 = 45_10
85 - 129 + 45 = 1
(№ 1327) 1001101_2 - 261_8 + 37_16
1001101_2 = 1 * 2^6 + 0 * 2^5 + 0 * 2^4 + 1 * 2^3 + 1 * 2^2 + 0 * 2^2 + 1 * 2^0 = 64 + 0 + 0 + 8 + 4 + 0 + 1 = 77_10
261_8 = 2 * 8^2 + 6 * 8^1 + 1 * 8^0 = 128 + 48 + 1 = 177_10
37_16 = 3 * 16^1 + 7 * 16^0 = 48 + 7 = 55_10
77 - 177 + 55 = -45
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.