Hey guys. So I have a problem that I was trying to solve but i am a beginner at C++ so i am having a really hard time solving this and coming up with the code.
the question is....
1. C(n,k) can be rewritten as n(n-1)(n-2)...(n-k+1)/k!. Implement a program that computes C(n,k) based on this formula (hint: the numerator is obviously an iteration, but what is the iteration variable?). Repeat the questions from above. This program is obviously better than 1 since it works on more input values, but how does it compare to 1 efficiency-wise? The appropriate measure of efficiency here would be the number of multiplies.
2.Use property (P2) to make your solution to 2 more efficient (in some cases).
I just have no idea where to start and how to even do it.