Program n1; Uses CRT; Var a,b,c,k: integer; begin Writeln('Vvedite a,b,c'); Readln(a,b,c); If (a=b)and(b=c) then begin k:=1; writeln('Ravnostoronnij') end else If (a=b)or(b=c)or(a=c) then begin k:=1; writeln('Ravnobedrennij'); end; If (sqr(a)=sqr(b)+sqr(c))or(sqr(b)=sqr(a)+sqr(c))or(sqr(c)=sqr(b)+sqr(a)) then begin k:=1; writeln('Pryamoygolnij'); end; If (a>b+c)or(b>a+c)or(c>a+b) then begin k:=1; writeln('treygolnik nelza sostavit'); end; If k=0 then writeln('Treygolnik Raznostoronnij'); readln end.
Вторая
Program n1; Uses CRT; Var a,b,c: integer; begin ClrScr; Writeln('Vvedite a,b,c'); Readln(a,b,c); If (a>0)and(b>0)and(c>0) then writeln('Summa kvadratov=',sqr(a)+sqr(b)+sqr(b)); If (a mod 2=0)or(b mod 2=0)or(c mod 2=0) then writeln('Summa =',a+b+c,', Proizvedenie =',a*b*c); readln end.
Program n1; Uses CRT; Const n=15; Var A: array[1..n] of integer; B: array[1..n] of integer; i,k,max: integer; begin randomize; clrscr; Writeln('ishodny massiv'); For i:=1 to n do begin a[i]:=random(100); a[i]:=a[i]-50; write(a[i]:4); end; writeln; writeln('polychenny massiv'); max:=0; For i:=1 to n do begin b[i]:=-a[i]; write(b[i]:4); If a[i]=b[i] then k:=k+1; If (b[i]>0)and(b[i]>max) then max:=b[i]; If (b[i]<0)and(-b[i]>max) then max:=-b[i]; end; writeln; Writeln('Kolychestvo neizmenyvshihsa elementov=',k,', samyi bolshoy po modyly element raven =',max); writeln end.
Первая
Program n1;
Uses CRT;
Var a,b,c,k: integer;
begin
Writeln('Vvedite a,b,c');
Readln(a,b,c);
If (a=b)and(b=c) then begin k:=1; writeln('Ravnostoronnij') end else
If (a=b)or(b=c)or(a=c) then begin k:=1; writeln('Ravnobedrennij'); end;
If (sqr(a)=sqr(b)+sqr(c))or(sqr(b)=sqr(a)+sqr(c))or(sqr(c)=sqr(b)+sqr(a))
then begin k:=1; writeln('Pryamoygolnij'); end;
If (a>b+c)or(b>a+c)or(c>a+b) then begin k:=1; writeln('treygolnik nelza sostavit'); end;
If k=0 then writeln('Treygolnik Raznostoronnij');
readln
end.
Вторая
Program n1;
Uses CRT;
Var a,b,c: integer;
begin
ClrScr;
Writeln('Vvedite a,b,c');
Readln(a,b,c);
If (a>0)and(b>0)and(c>0) then writeln('Summa kvadratov=',sqr(a)+sqr(b)+sqr(b));
If (a mod 2=0)or(b mod 2=0)or(c mod 2=0) then writeln('Summa =',a+b+c,', Proizvedenie =',a*b*c);
readln
end.
Program n1;
Uses CRT;
Const n=15;
Var A: array[1..n] of integer; B: array[1..n] of integer;
i,k,max: integer;
begin
randomize;
clrscr;
Writeln('ishodny massiv');
For i:=1 to n do
begin
a[i]:=random(100);
a[i]:=a[i]-50;
write(a[i]:4);
end;
writeln;
writeln('polychenny massiv');
max:=0;
For i:=1 to n do
begin
b[i]:=-a[i];
write(b[i]:4);
If a[i]=b[i] then k:=k+1;
If (b[i]>0)and(b[i]>max) then max:=b[i];
If (b[i]<0)and(-b[i]>max) then max:=-b[i];
end;
writeln;
Writeln('Kolychestvo neizmenyvshihsa elementov=',k,', samyi bolshoy po modyly element raven =',max);
writeln
end.