Рекурсивные алгоритмы

• View
378

• Category

Documents

Embed Size (px)

Text of Рекурсивные алгоритмы

• 1. . : , . , . , .

2. : . . Pascal_ABC_Net 3. . , ( , ). - : " ..." ( .. .) : : - - - 4. , - , . , . 5. () , ( ) ( ). , A B, B A. . 6. , 1. R (X,Y) 2. R/2 : (X+R; Y), (X; Y+R), (X-R; Y), (X; Y-R) 3. 4- . 2 3 (X,Y) Y (Y-R) (X+R)(X-R) X (Y+R) 7. ? 8. () 1. Program Rekurcia; 2. var 3. f: longint; 4. n: integer; 5. function factorial(n: integer):longint; 6. begin 7. if (n=0) or (n=1) then factorial:=1 8. else factorial:= factorial(n-1)*n; 9. end; 10. begin 11. write(n=); readln(n); 12. f:=factorial(n); 13. writeln (n,! = , f); 14. readln; 15. end. : 1. ? 2. ? n!= 1, n1 9. ? . . . . . . . , : . . ., . . . ; . . . ; . . . . , , . 10. : (. fractus , ) , , , , . ? 11. ? , , . , ( ). ? PascalABC 12. , : 1. , ? 2. () ? 3. ? 4. ()? x, y - alfa - m - v - 13. : , : , . 14. : , . ? ()? ? , ? 15. !

Recommended

Education
Education
Documents
Documents
Documents
Documents
Documents
Documents
Software
Documents
Documents
Software