Ask your own question, for FREE!
Mathematics 17 Online
OpenStudy (anonymous):

change this mathemathical equation into algorithm.where n are r inputs from the user.C(n,r)=nCr

geerky42 (geerky42):

Algorithm? As in writing programming language? Firstly I would declare function name factorial where it will loop, multiplying input by integers smaller than itself until it reaches 1, then return result. This function would be helpful here since \(_nC_r = \dfrac{n!}{r!(n-r)!}\) As you can see, you would need to call factorial function three times.

geerky42 (geerky42):

Let me know if this isn't what you are looking for.

OpenStudy (anonymous):

but how can i change the factorial in to algorithm???

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!