Jump to content

Pascal's triangle: Difference between revisions

m
Line 4,148:
<lang nim>const ROWS = 10
const TRILEN = toInt(ROWS * (ROWS + 1) / 2) # Sum of arth progression
var triangle = newSeqnewSeqOfCap[Natural](TRILEN) # Avoid reallocations
 
proc printPascalTri(row: Natural, result: var seq[Natural]) =
Cookies help us deliver our services. By using our services, you agree to our use of cookies.