Program to print the combination (nCr) of the given numberCombination (nCr) can be defined as the combination of n things taken r at a time without any repetition. ncr can be calculated as, AlgorithmMAIN
nCr(n r)
fact(n)
Java ProgramOutput: Enter the value of n and r? 6 4 nCr = 15 C ProgramOutput: Enter the value of n and r? 5 3 nCr = 10 Python ProgramOutput: Enter the value of n 5 Enter the value of r 3 nCr = 10 C# ProgramOutput: Enter the value of n and r? 5 3 nCr = 10 PHP ProgramOutput: Enter the value of n and r? 5 3 nCr = 10 Next Topic# |
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India