Лабораторная работа №1.
3) USES Crt;
VAR a,b,c: Integer;
BEGIN
ClrScr;
Write('Vvedite a=');Read(a);
Write('Vvedite b=');Read(b);
Write('Vvedite c=');Read(c);
IF ((a MOD 2)=0) and ((b MOD 2)=0) and ((c MOD 2)=0) THEN WriteLn('True')
ELSE WriteLn('False');
ReadKey;
END.
4) USES Crt;
VAR a,b,c: Real;
BEGIN
ClrScr;
Write('Vvedite a,b,c');WriteLn;
Read(a,b,c);
IF (a<(b+c)) and (b<(a+c)) and (c<(a+b)) THEN WriteLn('Treugolnik postroit mojno')
ELSE WriteLn('Treugolnik postroit nelsa');
ReadKey;
END.
5) USES Crt;
VAR a,b,c: Real;
g: Char;
BEGIN
ClrScr;
Write('Vvedite a,b,c '); WriteLn;
Read(a,b,c);
IF (Abs(a)>Abs(b)) And (Abs(a)>Abs(.
c)) THEN Write(a:3:3,' - Naibolshee chislo');
IF (Abs(b)>Abs(a)) And (Abs(b)>Abs(c)) THEN Write(b:3:3,' - Naibolshee chislo');
IF (Abs(c)>Abs(a)) And (Abs(c)>Abs(b)) THEN Write(c:3:3,' - Naibolshee chislo');
IF (Abs(c)=Abs(a)) And (Abs(c)=Abs(b)) THEN Write('Absolutnie velichini ravni');
Readkey;
END.
6) USES Crt;
VAR a,b,c,d, x1, x2: Real;
BEGIN
ClrScr;
WriteLn(' ax^2+bx+c=0');
Write('Vvedite a=');Read(a);
Write('Vvedite b=');Read(b);
Write('Vvedite c=');Read(c);
d:=(sqr(b)-4*a*c);
IF d<0 THEN WriteLn('Reschenii net, t.k. D<0')
ELSE IF d=0 THEN WriteLn('Edinstvennii koren x=',(-c/b))
ELSE begin
x1 := (-b+sqrt(d))/(2*a);
x2 := (-b-sqrt(d))/(2*a);
WriteLn('x1=', x1:3:3);
WriteLn('x2=', x1:3:3);
end;
ReadKey
END.
7) USES Crt;
VAR a,b: Real;
BEGIN
ClrScr;
Write(' ax=b');WriteLn;
Write('Vvedite a=');Read(a);
Write('Vvedite b=');Read(b);
IF a=0 THEN WriteLn('Reschnii net t.k. delenie na 0')
ELSE WriteLn(' x=',b/a:2:3);
ReadKey;
END.
Уважаемый посетитель!
Чтобы распечатать файл, скачайте его (в формате Word).
Ссылка на скачивание - внизу страницы.