#include <stdio.h>
#include <string.h>
#include <stdlib.h>
int main() {
int n, a, b, s;
scanf("%d", &n);
int pa[n][n];
for(int i=0; i<n; i++){
for(int j=0; j<=i; j++){
if(j==0 || j==i)
pa[i][j] = 1;
else
pa[i][j] = pa[i-1][j-1] + pa[i-1][j];
}
}
for(int i=0; i<n; i++){
for(int j=0; j<=i; j++){
printf("%d ", pa[i][j]);
}
printf("\n");
}
printf("\n");
scanf("%d %d", &a, &b);
s = a+b;
printf("%d", pa[s][b]);
return 0;
}
To embed this project on your website, copy the following code and paste it into your website's HTML: