Program myprg; var x,y: integer; begin writeln('x='); read (x); if (x больше =0) then y:=0; if (x больше 0) and (x меньше =1) then y:=x; else y:=sqr(sqr(x)); writeln ('y=',y); end. Program1.pas(9) : Встречено 'else', а ожидался...
Program myprg;
var
x,y: integer;
begin
writeln('x=');
read (x);
if (x>=0) then y:=0;
if (x>0) and (x<=1) then y:=x;
else y:=sqr(sqr(x));
writeln ('y=',y);
end.
Program1.pas(9) : Встречено 'else', а ожидался оператор Ошибка выходит помогите
Ответ(ы) на вопрос:
Program myprg;
var
x,y: integer;
begin
writeln('x=');
read (x);
if (x>=0) then y:=0;
if (x>0) and (x<=1) then y:=x
else y:=sqr(sqr(x));
writeln ('y=',y);
end.
Не нашли ответ?
Похожие вопросы