Program n1;
var x,y: real;
begin
read(x);
if x>=3 then y:=x*x+5 else y:=x-8;
writeln ("y=",y)
end.
Var
x,y:real;
begin
Write('Введите значение аргумента x: ');
Readln(x);
if x<=-7 then y:=25
else
if x<=5 then y:=17*x-1
else y:=sqr(x);
Writeln('Значение функции равно ',y:0:4)
end.
Тестовое решение:
Введите значение аргумента x: 3.78
Значение функции равно 63.2600
Program n1;
var a,b: integer;
begin
readln(a,b);
if(a mod 2=0) and (b mod 2=0) then
if a>b then write(a) else if b>a then write(b);
if(a mod 2<>0) and (b mod 2<>0)
then if a<b then write(a) else
if b<a then write(b);
if((a mod 2=0) and (b mod 2<>0)) or ((a mod 2<>0) and (b mod 2=0))
then write(a*b);
end.