This program finds the value of permutation and combination for given two input numbers Algorithm 1) Store the value of n to R0,store the value of r to R1 and store the value (n-r) to R2. 2) Compare if n>r continue the process, if n<r then stop computation, if n=r…