The Concept of Action  39  are evaluated only once.  If  in  the case of  to (down to)  the initial value is  greater (less)  than  the  final  value,  the  component  statement  is  not  executed. If the component statement is executed, it is an error if either  the initial value or final value cannot be assigned to the control variable.  The control variable is left undefined upon nonnal exit from the for  statement.  Produces as results:  program Cosine(Input,Output);  { Program 4.6 - Compute the cosine using the  expansion:  cos (X)  = 1 - sqr(X)/(2*1)  + sqr(X)*sqr(X)/(4*3*2*1)  - ...  const  Epsilon  1e-7;  var  Angle:  ASquared:  Series:  Term:  I,  N:  Power:  Real  Real  Real  Real  Integer  Integer  { radians };  { Angle squared };  { cosine series };  { next term in series };  { number of cosines to compute };  { power of next term };  begin  Readln(Input,N);  for I  := 1 to N do  end  begin  Readln(Input,Angle);  Term := 1;  Power:= 0;  Series:= 1;  ASquared := Sqr(Angle);  while Abs(Term)  >  Epsilon * Abs(Series)  do  begin  Power := Power + 2;  Term := -Term * Asquared /  (Power*(Power-1));  Series := Series + Term  end;  Writeln(Output, Angle,  Series, Power div 2  { =  terms to convergence })  end  1.534622E-01 9.882478E-01  3.333333E-01 9.449569E-01  5.000000E-01 8.775826E-01  1.000000E+00 5.403023E-01  3.141593E+00-1.000000E+00  3  4  5  6  10 