Anonymous user
Catalan numbers/Pascal's triangle: Difference between revisions
→{{header|Ada}}
(Updated D entry) |
|||
Line 4:
=={{header|Ada}}==
Uses package Pascal from the Pascal triangle solution[[http://rosettacode.org/wiki/Pascal%27s_triangle#Ada]]
<lang Ada>with Ada.Text_IO;▼
▲<lang Ada>with Ada.Text_IO, Pascal;
procedure Catalan is
Last: Positive := 17;
Row: Pascal.Row := Pascal.First_Row(2*Last+1);
begin
for I in 1 ..
Row := Pascal.Next_Row(Row);
▲ Ada.Text_IO.Put(Integer'Image(Pas(I+1)-Pas(I+2)));
end loop;
end Catalan;</lang>
{{out}}
<pre>1 2 5 14 42 132 429 1430 4862 16796 58786 208012 742900 2674440 9694845 35357670 129644790</pre>
=={{header|AutoHotkey}}==
|