By using two-dimensional array, write C program to display a table that represents a Pascal triangle of any size. In Pascal triangle, the first and the second rows are set to 1. Each element of the triangle (from the third row downward) is the sum of the element directly above it and the element to the left of the element directly above it. See the example Pascal triangle(size=5) below:
使用二維陣列,寫一個顯示巴斯卡三角形的程式。
Example input1:
5
Example output 1:
1 1 1 1 2 1 1 3 3 1 1 4 6 4 1
Example input 2:
0
Example output 2:
Hidden content!#include<stdio.h>int combin(int r,int n){* * * ** * * * * * * * * * * i,p=1; ** * * * ** * * *** **** * * * * * *** {