Using cycle operators, write a program that builds a graph of the parametric function on delphi.
Function
x = cos (t) sin (at); y = sin (t) cos (bt); Тн =< t= <Tk и изменяет с шагом Th I wrote the code:
procedure TForm1.BitBtn1Click(Sender: TObject); var x, y, xa, xb, t:real; begin xa:= strToFloat(edit1.Text); xb:= strToFloat(edit2.Text); t:= strToFloat(edit3.Text); chart1.Series[0].Clear; x:= xa; repeat y:=sin(x)*cos(xa); chart1.Series[0].AddY(y); x:= x+t; x:=cos(y)*sin(xb); chart1.Series[0].AddY(y); y:=xb; until x>=xb or y>=xb; end; end. Questions:
- I get the error expected end but received "expected end, but received," it gives exactly in
"until x>=xb or y>=xb;". - Did I write the program correctly (completely)?