Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
18
Task/Pascals-triangle/Amazing-Hopper/pascals-triangle.hopper
Normal file
18
Task/Pascals-triangle/Amazing-Hopper/pascals-triangle.hopper
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
#include <jambo.h>
|
||||
#define Mulbyandmoveto(_X_) Mul by '_X_', Move to '_X_'
|
||||
|
||||
Main
|
||||
filas=0, Get arg numeric '2', Move to 'filas'
|
||||
i=0, r=""
|
||||
Loop if( var 'i' Is less than 'filas' )
|
||||
c=1, j=0
|
||||
Set 'c' To str, Move to 'r'
|
||||
Loop if ( var 'j' Is less than 'i' )
|
||||
Set 'i' Minus 'j', Plus one 'j', Div it; Mul by and move to 'c'
|
||||
Multi cat ' r, "\t", Str(c) '; Move to 'r'
|
||||
++j
|
||||
Back
|
||||
Printnl 'r'
|
||||
++i
|
||||
Back
|
||||
End
|
||||
Loading…
Add table
Add a link
Reference in a new issue