Problem 2949. Combination logic
Create an algorithm in MATLAB that calculate the combination for the given positive integers n and k as inputs. When k > n, the result is 0. The formula of the combination, for n >= k, can be seen below:
Solution Stats
Problem Comments
Solution Comments
Show commentsProblem Recent Solvers64
Suggested Problems
-
5634 Solvers
-
Given an unsigned integer x, find the largest y by rearranging the bits in x
1676 Solvers
-
1048 Solvers
-
310 Solvers
-
Sum the squares of numbers from 1 to n
234 Solvers
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!