TheAlgorithms/C++ 1.0.0
All the algorithms implemented in C++
|
Pascal's triangle implementation. More...
#include <cstring>
#include <iomanip>
#include <iostream>
Go to the source code of this file.
Functions | |
void | show_pascal (int **arr, int n) |
int ** | pascal_triangle (int **arr, int n) |
int | main () |
Pascal's triangle implementation.
Definition in file pascal_triangle.cpp.
int main | ( | void | ) |
main function
Definition at line 52 of file pascal_triangle.cpp.
int ** pascal_triangle | ( | int ** | arr, |
int | n ) |
Print the triangle
[in,out] | arr | array containing Pascal numbers |
[in] | n | depth of Pascal triangle to print |
Definition at line 36 of file pascal_triangle.cpp.
void show_pascal | ( | int ** | arr, |
int | n ) |
Print the triangle
[in] | arr | 2D-array containing Pascal numbers |
[in] | n | depth of Pascal triangle to print |
Definition at line 18 of file pascal_triangle.cpp.