In java please

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

In java please

Post by answerhappygod »

In java please
In Java Please 1
In Java Please 1 (34.18 KiB) Viewed 38 times
Q1. (15 marks) Permutation refers to the arrangement of all members of a set in a specific order. The number of permutations on a set of n elements is given by n!, where ! represents factorial. The Permutation Coefficient represented by P(n, k) is used to represent the number of ways to obtain an ordered subset having k elements from a set of n elements. Mathematically it's given as: (1.1) P(n, k) = n(n-1) * (n − 2) * (n − 3) ** which is 0 when k>n, and otherwise equal to 10 3 (10,3) = 720 n! (n-k)! .* (n − k + 1) Note: Value for k should be less than n. Test Case: Write a function named per(int n, int k) that returns value after performing permutation. Example Enter values for n and k
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply