Объяснение:
1) Var
m: array [1..10, 1..10] of integer;
i,j,c:integer;
Begin
For i:=1 to 4 do
For j:=1 to 8 do
read(m[i,j]);
For i:=1 to 4 do
For j:=1 to 8 do
Begin
m[i,j]:=m[i,j]*m[i,j];
end;
For i:=1 to 4 do
Begin
For j:=1 to 8 do
write(m[i,j],' ');
writeln
end;
end.
2)Var
m: array [1..10, 1..10] of integer;
i,j,c:integer;
Begin
For i:=1 to 6 do
For j:=1 to 5 do
read(m[i,j]);
For i:=1 to 6 do
For j:=1 to 5 do
Begin
m[i,j]:=-1*m[i,j];
end;
For i:=1 to 6 do
Begin
For j:=1 to 5 do
write(m[i,j],' ');
writeln
end;
end.
Поделитесь своими знаниями, ответьте на вопрос:
Определите Х: DA16+1218=X10 16, 8 и 10 написано на нижних цифрах
Объяснение:
1)
var a,b,x,i:integer;
begin
readln(a);
x := 0;
for i := 1 to a do
begin
readln(b);
if (b div 100 > 0) and (b div 100 < 10) and (b mod 2 = 0) then
x := x+b;
end;
if x <> 0 then
writeln(x)
else
writeln('NO')
end.
2)
var a,b,x,i,c:integer;
begin
readln(a);
x := 0;
c :=0;
for i := 1 to a do
begin
readln(b);
if ((b mod 10 = 4 ) or (b mod 100 = 4)) and (b mod 8 = 0 ) then
begin
c:=c+b;
x := x+1;
end;
end;
writeln(c/x);
writeln(x)
end.