# Introduction In this lab, we will learn how to compute permutations (nPr) in C programming. The lab covers the following steps: First, we will read the input values for n and r, which are essential for computing permutations. We will use the `scanf()` function to get the input from the user and print the entered values to confirm the input. Next, we will implement functions to calculate the factorial and the permutation (nPr) using the formula `nPr = n! / (n-r)!`. We will handle the case where r is greater than n and display an error message accordingly.
Click the virtual machine below to start practicing