1)
var a,c:real; b:integer;
begin
for b:=2 to 7 do
begin
c:=cos((2*b+1)/2-1);
a:=0.4*c*c;
writeln('b = ',b,', a = ',a:5:3);
end;
end.
2)
var a,c:real; b:integer;
begin
b:=1;
while b<7 do<br> begin
b:=b+1;
c:=cos((2*b+1)/2-1);
a:=0.4*c*c;
writeln('b = ',b,', a = ',a:5:3);
end;
end.
3)
var a,c:real; b:integer;
begin
b:=1;
repeat
b:=b+1;
c:=cos((2*b+1)/2-1);
a:=0.4*c*c;
writeln('b = ',b,', a = ',a:5:3);
until b=7;
end.
Результат:
b = 2, a = 0.002
b = 3, a = 0.257
b = 4, a = 0.351
b = 5, a = 0.018
b = 6, a = 0.201
b = 7, a = 0.381