iii) A Program That Read Two numbers (n,r) & Display nPr (Permutation).

#include<stdio.h>
#include<conio.h>

void main()
{
    int n,r,i;
    long int p;
    clrscr();
    printf("Enter 1st number, n = ");
    scanf("%d",&n);
    printf("Enter 2nd number,r = ");
    scanf("%d",&r);

    if(n<=r)
    printf("r must be less than n");
    else
    {
       for(p=1,i=n-r+1;i<=n;p=p*i++);

       printf("%dP%d = %ld",n,r,p);
    }

    getch();
}

///////////////////////////////////////////////////////////////////////////
Copy & paste this code in your TC & run, then you will get output.......
If you have any problem please comment below.........