13 lines
216 B
Text
13 lines
216 B
Text
function pascaltriangle(h)
|
|
for i = 0:h-1
|
|
for k = 0:h-i
|
|
printf(" ");
|
|
endfor
|
|
for j = 0:i
|
|
printf("%3d ", bincoeff(i, j));
|
|
endfor
|
|
printf("\n");
|
|
endfor
|
|
endfunction
|
|
|
|
pascaltriangle(4);
|