Need coding for a program where given positive integers n and r, to find the number of r-permutations when repetition is allowed and r-combinations when repetition is allowed of the ser with n-element. the program should accept user's input and list down the r-permutations and r-combinations in lexicographic order.
...really desperate for help..thanks!