Anonymous user
Pascal's triangle: Difference between revisions
→{{header|C++}}
(simplified CL program) |
|||
Line 133:
=={{header|C++}}==
<cpp>#include <iostream>
#include <algorithm>
void genPyrN(int rows) {
Line 145 ⟶ 146:
int *thisRow = new int[i+1];
thisRow[0] = last[0]; // beginning of row
thisRow[i] = last[i-1]; // end of row
|