The table of function values ​​should be displayed in the form x = y = For some reason, only the first value x, y is output.

var a, b, x0, x1, dx, y, n : real; begin ... write('Enter a, b, x0, x1, dx: '); readln(a, b, x0, x1, dx); //3.1 1.5 0.5 1.5 0.25 n:= x0; repeat y:= ((sqrt(a*x0))+b)/(sqr(sin(x0)/cos(x0))); writeln('x=', x0:5:2, ' y=', y:5:2); x0:= x0 + dx; until (x0>=n) and (x0<=x1); x0:= n; 
  • a = 3.1 b = 1.5 x0 = 0.5 x1 = 1.5 dx = 0.25 0.25 the function step from x = 0.5 to x = 1.5 should be like this: x = 0.5 y = ... x = 0.75 y = ... x = 1 y = ... x = 1.25 y = ... x = 1.5 y = ... - Ilya
  • A simple for loop is enough here - MBo

1 answer 1

until means "not yet":

 repeat ... until (x0 > x1); 

that is: repeat until x0 is greater than x1 .