, , , , , , , , , . , . , , . PascalABC .
10
, . , , , . , , 1 9, 0 9. .
31
. repeat until. , , , .
10
:
1. fora:=1 to9 do
2. forb:=0 to9 do
3. forc:=0 to9 do
4. : if (a < > b) and (b < > c) and (a < > c)
5. , then write(a: 2, b, c)
6. . .
31
:
1. esp x
2. esp x , y, A1, i 1
3. repeat
4.
A2:= -A1 * x * x / (2 * i * (2 * i 1));
i:= i + 1;
y:= y + A2;
E:= abs (abs (A1) abs (A2));
A1:= A2
5. , until E < Eps
6. y.
, , , , , , , , , . , . , , . PascalABC .
|
|
var a,b,c:integer; begin fora:=1 to9 do forb:=0 to9 do forc:=0 to9 do if(a<>b)and(b<>c)and(a<>c) thenwrite(a:2,b,c); end. | Vari: Integer; y,A1,A2,E: Real; Eps,x: Real; begin write('Eps = '); readln(Eps); write('x= '); readln(x); y:= 1; A1:= 1; i:= 1; repeat A2:= -A1*x*x/(2*i*(2*i-1)); i:= i+1; y:= y + A2; E:=abs(abs(A1) - abs(A2)); A1:= A2; untilE<Eps; writeln(y:2:3); end. |
10 PascalABC | 31 PascalABC |
10
0.6 | 0.5 | ||
0.7 | 0.757 | ||
10 PascalABC | 31 PascalABC |