About 95 results
Open links in new tab
  1. c++ - pascal's Triangle implementation - Stack Overflow

    May 23, 2013 · I am trying to make a program for pascal's triangle,the formaula to calculate the rth value in nth row is n!/r!(n-r)! I've been tring to implement it like this: #include <iostream&gt...

  2. Pascal's Triangle for Python - Stack Overflow

    Jun 7, 2014 · pascal_triangle(5) Python zip () function returns the zip object, which is the iterator of tuples where the first item in each passed iterator is paired together, and then the second item in …

  3. Pascal's Triangle using mainly functions in C++ - Stack Overflow

    Nov 11, 2013 · Enter the number of rows you would like to print for Pascal's Triangle: 3 1 1 1 1 2 1

  4. largenumber - Pascal's Triangle in C - Stack Overflow

    Jan 21, 2015 · The task is to write a program to compute the value of a given position in Pascal's Triangle. And the formula given to compute it is written as element = row! / ( position! * (row - position)!

  5. Pascal's triangle in c with recursive functions - Stack Overflow

    In the function long paskal( int n , int i ), the n is representing the row whereas the i represent the column in that particular row and pascal() function is supposed to calculate the element at a particular …

  6. Pascal's triangle in python without using any loops

    Oct 26, 2018 · pascal_triangle(5) prints: 1 1 1 1 2 1 1 3 3 1 1 4 6 4 1 The problem is I'm trying to do it without using any type of loops but can't figure out how to do that. Any help would be appreciated. …

  7. java - Pascal's Triangle Format - Stack Overflow

    Nov 12, 2013 · The assignment is to create Pascal's Triangle without using arrays. I have the method that produces the values for the triangle below. The method accepts an integer for the maximum …

  8. How to efficiently calculate a row in Pascal's triangle?

    I'm interested in finding the nth row of Pascal's triangle (not a specific element but the whole row itself). What would be the most efficient way to do it? I thought about the conventional way to

  9. recursion - C++ Pascal's triangle - Stack Overflow

    Mar 5, 2015 · I'm looking for an explanation for how the recursive version of pascal's triangle works The following is the recursive return line for pascal's triangle. int get_pascal(const int row_no,const int

  10. python - Program for an upright and inverted triangle pattern with one ...

    Nov 4, 2023 · To avoid confusion, note that this is not Pascal's triangle. First, Pascal's triangle is mathematical, consisting of numbers. Second, Pascal's triangle is shaped differently; it doesn't get …