Pascal's triangle: Difference between revisions
Content added Content deleted
(Updated second D version) |
m ('''See also:''' * Evaluate binomial coefficients) |
||
Line 8: | Line 8: | ||
Write a function that prints out the first n rows of the triangle (with <tt>f(1)</tt> yielding the row consisting of only the element 1). This can be done either by summing elements from the previous rows or using a binary coefficient or combination function. Behavior for <tt>n <= 0</tt> does not need to be uniform, but should be noted. |
Write a function that prints out the first n rows of the triangle (with <tt>f(1)</tt> yielding the row consisting of only the element 1). This can be done either by summing elements from the previous rows or using a binary coefficient or combination function. Behavior for <tt>n <= 0</tt> does not need to be uniform, but should be noted. |
||
'''See also:''' |
|||
* [[Evaluate binomial coefficients]] |
|||
=={{header|Ada}}== |
=={{header|Ada}}== |
||
<lang ada>with Ada.Integer_Text_Io; use Ada.Integer_Text_Io; |
<lang ada>with Ada.Integer_Text_Io; use Ada.Integer_Text_Io; |