Grepper
GREPPER
SEARCH SNIPPETS
PRICING
FAQ
USAGE DOCS
INSTALL GREPPER
All Languages
>>
Pascal
>>
how to find the nth row of pascal's triangle in c
“how to find the nth row of pascal's triangle in c” Code Answer
how to find the nth row of pascal's triangle in c
c by
C Will
on Aug 26 2020
Donate
0
#include <stdio.h> #include <stdlib.h> int main() { int N; scanf("%d", &N); int pascalArray[N + 1][N + 1]; int i, j; if(0 <= N && N <= 20) { for (i = 0; i < N + 1; i++) { for(j = 0; j <= i; j++) { if(j == 0 || j == i) pascalArray[i][j] = 1; else pascalArray[i][j] = pascalArray[i-1][j-1] + pascalArray[i-1][j]; if (i == N) printf("%d ", pascalArray[i][j]); } } } return 0; }
Pascal queries related to “how to find the nth row of pascal's triangle in c”
how to find the nth row of pascal's triangle in c
Learn how Grepper helps you improve as a Developer!
INSTALL GREPPER FOR CHROME
All Pascal Answers
comment in pascal
comments in pascal
how to find the ith row of pascal's triangle in c
how to find the nth row of pascal's triangle in c
Kth Row Of Pascal's Triangle
Pascal Triangle gfg
pascal triangle output
pascal's triangle java 2d array
pascal's triangle python
pascals triangle java
program to print pascal triangle
X
Grepper Account Login Required
Oops, You will need to install Grepper and log-in to perform this action.
Install Grepper Here