Go4Expert (http://www.go4expert.com/)
-   C++ (http://www.go4expert.com/forums/cpp/)
-   -   c++ Binomial (http://www.go4expert.com/forums/cpp-binomial-t5327/)

pmbaaru 18Jul2007 10:25

c++ Binomial
I have a problem in solving these C++ Program.

The binomial expression can be expanded as follows
If n=2 a2+2ab+b2
1 2 1
1 3 3 1
The coefficients will be gotten using the combination ncm and its refered to as the pascal triangle
Such that if n=4 then;
4c0 4!/(4-0)!0!=1
4c1 4!/(4-1)!1!=4
4c2 4!/(4-2)!2!=6

1. write a function to compute the combinations
2. implement it in c++ program to output the pascal triangle for a number n.

shabbir 18Jul2007 19:45

Re: c++ Binomial
Moved thread from Introduce yourself to C-C++ forum.

All times are GMT +5.5. The time now is 04:06.