HISTORY:
Pascal's triangle is a geometric arrangement of thebinomialcoefficients in a triangle. Pascal's Triangle is named after Blaise Pascal in much of the western world, although other mathematicians studied it centuries before him in India, Persia, China, and Italy.but Blaise Pascal was the first person to discover the importance of all of the patterns it contained.
CONSSTRUCTION:
At the tip of Pascal's Triangle is the number 1, which makes up the zeroth row. The first row (1 & 1) contains two 1's, both formed by adding the two numbers above them to the left and the right, in this case 1 and 0 (all numbers outside the Triangle are 0's). Do the same to create the 2nd row: 0+1=1; 1+1=2; 1+0=1. And the third: 0+1=1; 1+2=3; 2+1=3; 1+0=1. In this way, the rows of the triangle go on infinitly. A number in the triangle can also be found by nCr (n Choose r) where n is the number of the row and r is the element in that row. For example, in row 3, 1 is the zeroth element, 3 is element number 1, the next three is the 2nd element, and the last 1 is the 3rd element. The formula for nCr is:
n!/r!(n-r)!
Now you can easily search for the right code for C++, from Google. Hope this would help u in assignments.