var f,y: real;
begin
readln(y);
if y>2 then f:=2
else if (y>0) and (y<=2) then f:=0
else f:=(-3)*y;
write('f(y)=',f);
end.
var
y, f: real;
read(y);
if y > 2 then
f := 3
else
if y > 0 then
f := 0
f := 3 * y;
write(f);
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
Verified answer
var f,y: real;
begin
readln(y);
if y>2 then f:=2
else if (y>0) and (y<=2) then f:=0
else f:=(-3)*y;
write('f(y)=',f);
end.
var
y, f: real;
begin
read(y);
if y > 2 then
f := 3
else
if y > 0 then
f := 0
else
f := 3 * y;
write(f);
end.