Add tasks for all the new languages
This commit is contained in:
parent
9dc3c2bb62
commit
bba7bfd280
13208 changed files with 134745 additions and 0 deletions
18
Task/Pascals-triangle/Potion/pascals-triangle.potion
Normal file
18
Task/Pascals-triangle/Potion/pascals-triangle.potion
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
printpascal = (n) :
|
||||
if (n < 1) :
|
||||
1 print
|
||||
(1)
|
||||
. else :
|
||||
prev = printpascal(n - 1)
|
||||
prev append(0)
|
||||
curr = (1)
|
||||
n times (i):
|
||||
curr append(prev(i) + prev(i + 1))
|
||||
.
|
||||
"\n" print
|
||||
curr join(", ") print
|
||||
curr
|
||||
.
|
||||
.
|
||||
|
||||
printpascal(read number integer)
|
||||
Loading…
Add table
Add a link
Reference in a new issue