Ask your own question, for FREE!
Mathematics 15 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!
Latest Questions
Jalissa21: What does adenoma mea?
16 minutes ago 1 Reply 0 Medals
Twilightt: How Can We Prevent Gun Violence in American Schools?
2 hours ago 2 Replies 1 Medal
Twaylor: possible?
2 days ago 5 Replies 0 Medals
Arriyanalol: hekp
3 days ago 33 Replies 0 Medals
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!