Data update
This commit is contained in:
parent
81fd053722
commit
52a6ef48dd
10248 changed files with 63654 additions and 6775 deletions
23
Task/Fibonacci-sequence/PostScript/fibonacci-sequence-1.ps
Normal file
23
Task/Fibonacci-sequence/PostScript/fibonacci-sequence-1.ps
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
%!PS
|
||||
|
||||
% We want the 'n'th fibonacci number
|
||||
/n 13 def
|
||||
|
||||
% Prepare output canvas:
|
||||
/Helvetica findfont 20 scalefont setfont
|
||||
100 100 moveto
|
||||
|
||||
%define the function recursively:
|
||||
/fib {
|
||||
dup 2 lt
|
||||
{ }
|
||||
{
|
||||
dup 1 sub fib
|
||||
exch 2 sub fib
|
||||
add
|
||||
} ifelse
|
||||
} def
|
||||
|
||||
(Fib\() show n (....) cvs show (\) = ) show n fib (.....) cvs show
|
||||
|
||||
showpage
|
||||
Loading…
Add table
Add a link
Reference in a new issue