1) program cgt; var a:array[1..100,1..100]of integer; s,n,m,i,j:integer; begin read(n,m); s:=0; for i:=1 to n do for j:=1 to m do read(a[i,j]); for i:=1 to n do begin for j:=1 to m do if(i mod 2=1)then s:=s+a[i,j]; end; writeln(s); end. 2) program cgt; var a:array[1..100,1..100]of integer; n,m,i,j:integer; s,p:real; begin read(n,m); s:=0; for i:=1 to n do for j:=1 to m do read(a[i,j]); for i:=1 to n do begin p:=1; if(i mod 2=0)then begin for j:=1 to m do begin p:=p*(sin(a[i,j]*pi/180))/(cos(a[i,j]*pi/180)); end; s:=s+p; end; end; writeln(s); end. 3)
program cgt; var a:array[1..100,1..100]of integer; n,m,i,j,max,x,y:integer; begin read(n,m); for i:=1 to n do for j:=1 to m do read(a[i,j]); max:=a[1,1]; for i:=1 to n do if(i mod 2=1)then begin for j:=1 to m do if(a[i,j]>=max)then begin max:=a[i,j]; x:=i; y:=j; end; end; writeln(x,' ',y); end.
Uses Crt; Var a,b,i,tek,sum10,sum3:integer; Procedure TroichSS (te:integer; var sum3:integer); var m:array[1..10]of integer; k,j,su3:integer; begin write(te:4); repeat inc(k); m[k]:=te mod 3; te:=te div 3; until te<3; inc(k); m[k]:=te mod 3; for j:=k downto 1 do begin su3:=su3+m[j]; write(m[j]:3) end; write(' su3=',su3); sum3:=su3; su3:=0; k:=0; end; Procedure DesiatSS (te:integer; var sum10:integer); var m:array[1..10]of integer; k,j,su10:integer; begin write(te:4); repeat inc(k); m[k]:=te mod 10; te:=te div 10; until te<10; inc(k); m[k]:=te mod 10; for j:=k downto 1 do begin su10:=su10+m[j]; write(m[j]:3); end; writeln(' su10=',su10); sum10:=su10; su10:=0; k:=0; end; Begin //Задание интервала [a; b] a:=1; b:=1000; writeln('Интервале [a; b]',a:4,b:4); //Сумма цифр троичных и десятичных чисел for i:=a to b do begin TroichSS(i,sum3); DesiatSS(i,sum10); if sum3=sum10 then begin writeln('Э в р и к а!'); delay(5000); end; end; writeln('К о н е ц.'); End.
program cgt;
var a:array[1..100,1..100]of integer;
s,n,m,i,j:integer;
begin
read(n,m);
s:=0;
for i:=1 to n do
for j:=1 to m do
read(a[i,j]);
for i:=1 to n do
begin
for j:=1 to m do
if(i mod 2=1)then s:=s+a[i,j];
end;
writeln(s);
end.
2)
program cgt;
var a:array[1..100,1..100]of integer;
n,m,i,j:integer;
s,p:real;
begin
read(n,m);
s:=0;
for i:=1 to n do
for j:=1 to m do
read(a[i,j]);
for i:=1 to n do
begin
p:=1;
if(i mod 2=0)then begin
for j:=1 to m do
begin
p:=p*(sin(a[i,j]*pi/180))/(cos(a[i,j]*pi/180));
end;
s:=s+p;
end;
end;
writeln(s);
end.
3)
program cgt;
var a:array[1..100,1..100]of integer;
n,m,i,j,max,x,y:integer;
begin
read(n,m);
for i:=1 to n do
for j:=1 to m do
read(a[i,j]);
max:=a[1,1];
for i:=1 to n do
if(i mod 2=1)then begin
for j:=1 to m do
if(a[i,j]>=max)then begin
max:=a[i,j];
x:=i;
y:=j;
end;
end;
writeln(x,' ',y);
end.
Var a,b,i,tek,sum10,sum3:integer;
Procedure TroichSS (te:integer; var sum3:integer);
var m:array[1..10]of integer;
k,j,su3:integer;
begin
write(te:4);
repeat
inc(k); m[k]:=te mod 3; te:=te div 3;
until te<3;
inc(k); m[k]:=te mod 3;
for j:=k downto 1 do
begin su3:=su3+m[j]; write(m[j]:3) end;
write(' su3=',su3);
sum3:=su3; su3:=0; k:=0;
end;
Procedure DesiatSS (te:integer; var sum10:integer);
var m:array[1..10]of integer;
k,j,su10:integer;
begin
write(te:4);
repeat
inc(k); m[k]:=te mod 10; te:=te div 10;
until te<10;
inc(k); m[k]:=te mod 10;
for j:=k downto 1 do
begin su10:=su10+m[j]; write(m[j]:3); end;
writeln(' su10=',su10);
sum10:=su10; su10:=0; k:=0;
end;
Begin
//Задание интервала [a; b]
a:=1; b:=1000;
writeln('Интервале [a; b]',a:4,b:4);
//Сумма цифр троичных и десятичных чисел
for i:=a to b do
begin
TroichSS(i,sum3); DesiatSS(i,sum10);
if sum3=sum10 then
begin writeln('Э в р и к а!'); delay(5000); end;
end;
writeln('К о н е ц.');
End.
ответ: 39