Data update
This commit is contained in:
parent
81fd053722
commit
52a6ef48dd
10248 changed files with 63654 additions and 6775 deletions
23
Task/Sudan-function/Chipmunk-Basic/sudan-function.basic
Normal file
23
Task/Sudan-function/Chipmunk-Basic/sudan-function.basic
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
100 sub f(n,x,y)
|
||||
110 if n = 0 then f = x+y : exit sub
|
||||
120 if y = 0 then f = x : exit sub
|
||||
130 f = f(n-1,f(n,x,y-1),f(n,x,y-1)+y)
|
||||
140 end sub
|
||||
150 for n = 0 to 1
|
||||
160 print using " Values of F(#, x, y ):";n
|
||||
170 print " y/x 0 1 2 3 4 5"
|
||||
180 print " -----------------------------"
|
||||
190 for y = 0 to 6
|
||||
200 print y;" |";
|
||||
210 for x = 0 to 5
|
||||
220 print using "####";f(n,x,y);
|
||||
230 next x
|
||||
240 print
|
||||
250 next y
|
||||
260 print
|
||||
270 next n
|
||||
280 print "F(0,0,0) = ";f(0,0,0)
|
||||
290 print "F(1,3,3) = ";f(1,3,3)
|
||||
300 print "F(2,1,1) = ";f(2,1,1)
|
||||
310 print "F(3,1,1) = ";f(3,1,1)
|
||||
320 print "F(2,2,1) = ";f(2,2,1)
|
||||
Loading…
Add table
Add a link
Reference in a new issue