我们发现其阶乘的数字每次增加 2。如何在 Pascal 中实现它?这是代码:
const n = 3;
const f = 6;
var a, sin_a, sin_a1: real;
factorial,factorial1: longint;
i,i1: byte;
begin
write('введите а: ');
readln(a);
factorial:= 1;
factorial1:= 1;
for i := 2 to n do
factorial:= factorial * i;
for i1:= 2 to n1 do
factorial1:= factorial1 * i1;
sin_a:=a-((power(a,n)/factorial)+(power(a,n+2)/factorial+2));
sin_a1:= power(a,n+2)/factorial+2;
writeln('результат = ',sin_a);
writeln(sin_a1);
end.