N
N
NEKITVULGAR2021-04-14 15:15:55
Pascal
NEKITVULGAR, 2021-04-14 15:15:55

I can't figure out what the problem is, does the else error?

Program a;
varx,y:real;
begin
writeln('Enter number x');
read(x);
if x < 0 then;
y:=cos(2*x)+exp(x)
writeln('y=',y)
else
y:=7x/abs(2x-1);
writeln('y=',y);
end.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
StiflerProger, 2021-04-14
@StiflerProger

Program a;
var x,y:real;
begin
writeln ('Введите число x');
read(x);

if x < 0 then begin
  y:=cos(2*x)+exp(x)
  writeln('y=',y)
  end
else begin
  y:=7x/abs(2x-1);
  writeln(‘y=‘,y);
end;

end.

Like so)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question