Algorithms_in_C++ 1.0.0
Set of algorithms implemented in C++.
|
Pascal's triangle implementation. More...
#include <cstring>
#include <iomanip>
#include <iostream>
Functions | |
void | show_pascal (int **arr, int n) |
int ** | pascal_triangle (int **arr, int n) |
int | main () |
Pascal's triangle implementation.
int main | ( | void | ) |
main function
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 |
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 |