1)var a:array [0..5] of Integer; i,j:Integer; begin Randomize; j:=0; for i:=0 to 5 do a[i]:=Random(100); for i:=0 to 5 do if a[i] mod 3 =0 then Inc(j); Writeln(j); readln; 2)var a:array [0..5] of Integer; i,j:Integer; begin Randomize; j:=0; for i:=0 to 5 do a[i]:=Random(100); for i:=0 to 5 do if a[i] mod 2 =0 then j:=j+a[i]; Writeln(j); readln; 3)a:array [0..5] of Integer; i,s:Integer; begin Randomize; s:=1; for i:=0 to 5 do a[i]:=Random(9)+1; for i:=0 to 5 do if i mod 2 <>0 then s:=s*a[i]; Writeln(s); readln; end. 4)const n=5;m=5; var a:array [0..n,0..m] of Integer; i,j:Integer; begin Randomize; for i:=0 to n do for j:=0 to m do a[i,j]:=Random(100); for i:=0 to n do begin Writeln; for j:=0 to m do write(a[i,j]:3); end; for i:=0 to n do for j:=0 to m do begin if a[i,j] mod 2 =0 then a[i,j]:=2 else if a[i,j] mod 2 <>0 then a[i,j]:=1; end; Writeln; for i:=0 to n do begin Writeln; for j:=0 to m do write(a[i,j]:3); end; Readln; end. 5)const n=5;m=5; var a:array [0..n,0..m] of Integer; i,j:Integer; begin Randomize; for i:=0 to n do for j:=0 to m do a[i,j]:=Random(10); for i:=0 to n do begin Writeln; for j:=0 to m do write(a[i,j]:3); end; for i:=0 to n do for j:=0 to m do a[i,j]:=a[i,j]*2; Writeln; for i:=0 to n do begin Writeln; for j:=0 to m do write(a[i,j]:3); end; Readln; end.
uses crt; var a,b,c,mn,mx,sr,p,s:real; begin clrscr; writeln('Введите 3 числа:'); readln(a,b,c); if(a<=abs(b-c))or(a>=b+c)then write('Это не треугольник!') else begin mn:=a; if b<mn then mn:=b; if c<mn then mn:=c; mx:=a; if b>mx then mx:=b; if c>mx then mx:=c; sr:=a+b+c-mn-mx; if(a=b)and(b=c) then writeln('Это равносторонний треугольник') else if((a=b)and(b<>c))or((a=c)and(b<>c))or((b=c)and(a<>b))then writeln('Это равнобедренный треугольник') else writeln('Это разноcторонний треугольник'); p:=(a+b+c)/2; s:=sqrt(p*(p-a)*(p-b)*(p-c)); writeln('его площадь=',s:0:2); write('Стороны в порядке убывания: ',mx:0:2,' ',sr:0:2,' ',mn:0:2); end; readln end.
1)var a:array [0..5] of Integer; i,j:Integer;
begin
Randomize;
j:=0;
for i:=0 to 5 do
a[i]:=Random(100);
for i:=0 to 5 do
if a[i] mod 3 =0 then
Inc(j);
Writeln(j);
readln;
2)var a:array [0..5] of Integer; i,j:Integer;
begin
Randomize;
j:=0;
for i:=0 to 5 do
a[i]:=Random(100);
for i:=0 to 5 do
if a[i] mod 2 =0 then
j:=j+a[i];
Writeln(j);
readln;
3)a:array [0..5] of Integer; i,s:Integer;
begin
Randomize;
s:=1;
for i:=0 to 5 do
a[i]:=Random(9)+1;
for i:=0 to 5 do
if i mod 2 <>0 then
s:=s*a[i];
Writeln(s);
readln;
end.
4)const n=5;m=5;
var a:array [0..n,0..m] of Integer; i,j:Integer;
begin
Randomize;
for i:=0 to n do
for j:=0 to m do
a[i,j]:=Random(100);
for i:=0 to n do
begin
Writeln;
for j:=0 to m do
write(a[i,j]:3);
end;
for i:=0 to n do
for j:=0 to m do
begin
if a[i,j] mod 2 =0 then
a[i,j]:=2
else if a[i,j] mod 2 <>0 then
a[i,j]:=1;
end;
Writeln;
for i:=0 to n do
begin
Writeln;
for j:=0 to m do
write(a[i,j]:3);
end;
Readln;
end.
5)const n=5;m=5;
var a:array [0..n,0..m] of Integer; i,j:Integer;
begin
Randomize;
for i:=0 to n do
for j:=0 to m do
a[i,j]:=Random(10);
for i:=0 to n do
begin
Writeln;
for j:=0 to m do
write(a[i,j]:3);
end;
for i:=0 to n do
for j:=0 to m do
a[i,j]:=a[i,j]*2;
Writeln;
for i:=0 to n do
begin
Writeln;
for j:=0 to m do
write(a[i,j]:3);
end;
Readln;
end.
var a,b,c,mn,mx,sr,p,s:real;
begin
clrscr;
writeln('Введите 3 числа:');
readln(a,b,c);
if(a<=abs(b-c))or(a>=b+c)then
write('Это не треугольник!') else
begin
mn:=a;
if b<mn then mn:=b;
if c<mn then mn:=c;
mx:=a;
if b>mx then mx:=b;
if c>mx then mx:=c;
sr:=a+b+c-mn-mx;
if(a=b)and(b=c) then writeln('Это равносторонний треугольник')
else if((a=b)and(b<>c))or((a=c)and(b<>c))or((b=c)and(a<>b))then
writeln('Это равнобедренный треугольник')
else writeln('Это разноcторонний треугольник');
p:=(a+b+c)/2;
s:=sqrt(p*(p-a)*(p-b)*(p-c));
writeln('его площадь=',s:0:2);
write('Стороны в порядке убывания: ',mx:0:2,' ',sr:0:2,' ',mn:0:2);
end;
readln
end.